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

Side by Side Diff: ui/gfx/compositor/layer.h

Issue 8508009: Debugging code to print layer tree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes as requested Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef UI_GFX_COMPOSITOR_LAYER_H_ 5 #ifndef UI_GFX_COMPOSITOR_LAYER_H_
6 #define UI_GFX_COMPOSITOR_LAYER_H_ 6 #define UI_GFX_COMPOSITOR_LAYER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop.h" 15 #include "base/message_loop.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContentLayerClient .h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContentLayerClient .h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebLayer.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebLayer.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebLayerClient.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebLayerClient.h"
18 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // See description in View for details 146 // See description in View for details
146 void SetFillsBoundsOpaquely(bool fills_bounds_opaquely); 147 void SetFillsBoundsOpaquely(bool fills_bounds_opaquely);
147 bool fills_bounds_opaquely() const { return fills_bounds_opaquely_; } 148 bool fills_bounds_opaquely() const { return fills_bounds_opaquely_; }
148 149
149 // Returns the invalid rectangle. That is, the region of the layer that needs 150 // Returns the invalid rectangle. That is, the region of the layer that needs
150 // to be repainted. This is exposed for testing and isn't generally useful. 151 // to be repainted. This is exposed for testing and isn't generally useful.
151 const gfx::Rect& invalid_rect() const { return invalid_rect_; } 152 const gfx::Rect& invalid_rect() const { return invalid_rect_; }
152 153
153 const gfx::Rect& hole_rect() const { return hole_rect_; } 154 const gfx::Rect& hole_rect() const { return hole_rect_; }
154 155
156 const std::string& name() const { return name_; }
157 void set_name(const std::string& name) { name_ = name; }
158
155 // The compositor. 159 // The compositor.
156 const Compositor* compositor() const { return compositor_; } 160 const Compositor* compositor() const { return compositor_; }
157 Compositor* compositor() { return compositor_; } 161 Compositor* compositor() { return compositor_; }
158 162
159 const ui::Texture* texture() const { return texture_.get(); } 163 const ui::Texture* texture() const { return texture_.get(); }
160 164
161 // |texture| cannot be NULL, and this function cannot be called more than 165 // |texture| cannot be NULL, and this function cannot be called more than
162 // once. 166 // once.
163 // TODO(beng): This can be removed from the API when we are in a 167 // TODO(beng): This can be removed from the API when we are in a
164 // single-compositor world. 168 // single-compositor world.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 299
296 gfx::Rect hole_rect_; 300 gfx::Rect hole_rect_;
297 301
298 gfx::Rect invalid_rect_; 302 gfx::Rect invalid_rect_;
299 303
300 // If true the layer is always up to date. 304 // If true the layer is always up to date.
301 bool layer_updated_externally_; 305 bool layer_updated_externally_;
302 306
303 float opacity_; 307 float opacity_;
304 308
309 std::string name_;
tfarina 2011/11/11 18:46:28 nit: add doc?
310
305 LayerDelegate* delegate_; 311 LayerDelegate* delegate_;
306 312
307 scoped_ptr<LayerAnimator> animator_; 313 scoped_ptr<LayerAnimator> animator_;
308 314
309 #if defined(USE_WEBKIT_COMPOSITOR) 315 #if defined(USE_WEBKIT_COMPOSITOR)
310 WebKit::WebLayer web_layer_; 316 WebKit::WebLayer web_layer_;
311 bool web_layer_is_accelerated_; 317 bool web_layer_is_accelerated_;
312 #endif 318 #endif
313 319
314 DISALLOW_COPY_AND_ASSIGN(Layer); 320 DISALLOW_COPY_AND_ASSIGN(Layer);
315 }; 321 };
316 322
317 } // namespace ui 323 } // namespace ui
318 324
319 #endif // UI_GFX_COMPOSITOR_LAYER_H_ 325 #endif // UI_GFX_COMPOSITOR_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698