diff --git a/samples/desktop.cpp b/samples/desktop.cpp index 292fecc69af94ae34e9fc4fe5324834c8f836e56..6b1510f638cb62893c383c815cd3228db52321e1 100644 --- a/samples/desktop.cpp +++ b/samples/desktop.cpp @@ -117,8 +117,8 @@ public: option->SetWindowName("desktop"); window_ = OHOS::Rosen::Window::Create(option->GetWindowName(), option); if (window_ != nullptr) { - SurfaceNode_ = window_->GetSurfaceNode(); - SurfaceNode_->SetBounds(0, 0, desktopW, desktopH); // surface bounds is window rect. + surfaceNode_ = window_->GetSurfaceNode(); + surfaceNode_->SetBounds(0, 0, desktopW, desktopH); // surface bounds is window rect. RSTransaction::FlushImplicitTransaction(); window_->Show(); } else { @@ -126,11 +126,11 @@ public: return; } - if (SurfaceNode_ == nullptr) { + if (surfaceNode_ == nullptr) { return; } - rsSurface_ = RSSurfaceExtractor::ExtractRSSurface(SurfaceNode_); + rsSurface_ = RSSurfaceExtractor::ExtractRSSurface(surfaceNode_); if (rsSurface_ == nullptr) { return; } @@ -179,7 +179,7 @@ public: private: OHOS::sptr window_ = nullptr; - std::shared_ptr SurfaceNode_ = nullptr; + std::shared_ptr surfaceNode_ = nullptr; std::shared_ptr rsSurface_ = nullptr; int desktopW = 500; int desktopH = 500;