Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Side by Side Diff: services/gfx/compositor/renderer_state.cc

Issue 1779933003: Mozart: Replace Set/Reset nomenclature with Set/Clear. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-8
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/gfx/compositor/renderer_state.h ('k') | services/ui/launcher/launcher_view_tree.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/gfx/compositor/renderer_state.h" 5 #include "services/gfx/compositor/renderer_state.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 9
10 namespace compositor { 10 namespace compositor {
(...skipping 12 matching lines...) Expand all
23 !root_scene_viewport_.Equals(viewport)) { 23 !root_scene_viewport_.Equals(viewport)) {
24 root_scene_ = scene; 24 root_scene_ = scene;
25 root_scene_version_ = version; 25 root_scene_version_ = version;
26 root_scene_viewport_ = viewport; 26 root_scene_viewport_ = viewport;
27 SetSnapshot(nullptr); 27 SetSnapshot(nullptr);
28 return true; 28 return true;
29 } 29 }
30 return false; 30 return false;
31 } 31 }
32 32
33 bool RendererState::ResetRootScene() { 33 bool RendererState::ClearRootScene() {
34 if (root_scene_) { 34 if (root_scene_) {
35 root_scene_ = nullptr; 35 root_scene_ = nullptr;
36 SetSnapshot(nullptr); 36 SetSnapshot(nullptr);
37 return true; 37 return true;
38 } 38 }
39 return false; 39 return false;
40 } 40 }
41 41
42 void RendererState::SetSnapshot(const scoped_refptr<const Snapshot>& snapshot) { 42 void RendererState::SetSnapshot(const scoped_refptr<const Snapshot>& snapshot) {
43 current_snapshot_ = snapshot; 43 current_snapshot_ = snapshot;
(...skipping 10 matching lines...) Expand all
54 return formatted_label_cache_; 54 return formatted_label_cache_;
55 } 55 }
56 56
57 std::ostream& operator<<(std::ostream& os, RendererState* renderer_state) { 57 std::ostream& operator<<(std::ostream& os, RendererState* renderer_state) {
58 if (!renderer_state) 58 if (!renderer_state)
59 return os << "null"; 59 return os << "null";
60 return os << renderer_state->FormattedLabel(); 60 return os << renderer_state->FormattedLabel();
61 } 61 }
62 62
63 } // namespace compositor 63 } // namespace compositor
OLDNEW
« no previous file with comments | « services/gfx/compositor/renderer_state.h ('k') | services/ui/launcher/launcher_view_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698