OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_H_ |
6 #define UI_COMPOSITOR_LAYER_H_ | 6 #define UI_COMPOSITOR_LAYER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 namespace cc { | 32 namespace cc { |
33 class ContentLayer; | 33 class ContentLayer; |
34 class CopyOutputRequest; | 34 class CopyOutputRequest; |
35 class DelegatedFrameData; | 35 class DelegatedFrameData; |
36 class DelegatedRendererLayer; | 36 class DelegatedRendererLayer; |
37 class Layer; | 37 class Layer; |
38 class ResourceUpdateQueue; | 38 class ResourceUpdateQueue; |
39 class SolidColorLayer; | 39 class SolidColorLayer; |
40 class TextureLayer; | 40 class TextureLayer; |
41 struct TransferableResource; | 41 struct ReturnedResource; |
42 typedef std::vector<TransferableResource> TransferableResourceArray; | 42 typedef std::vector<ReturnedResource> ReturnedResourceArray; |
43 } | 43 } |
44 | 44 |
45 namespace ui { | 45 namespace ui { |
46 | 46 |
47 class Compositor; | 47 class Compositor; |
48 class LayerAnimator; | 48 class LayerAnimator; |
49 class Texture; | 49 class Texture; |
50 | 50 |
51 // Layer manages a texture, transform and a set of child Layers. Any View that | 51 // Layer manages a texture, transform and a set of child Layers. Any View that |
52 // has enabled layers ends up creating a Layer to manage the texture. | 52 // has enabled layers ends up creating a Layer to manage the texture. |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // Sets a delegated frame, coming from a child compositor. | 260 // Sets a delegated frame, coming from a child compositor. |
261 void SetDelegatedFrame(scoped_ptr<cc::DelegatedFrameData> frame, | 261 void SetDelegatedFrame(scoped_ptr<cc::DelegatedFrameData> frame, |
262 gfx::Size frame_size_in_dip); | 262 gfx::Size frame_size_in_dip); |
263 | 263 |
264 bool has_external_content() { | 264 bool has_external_content() { |
265 return texture_layer_.get() || delegated_renderer_layer_.get(); | 265 return texture_layer_.get() || delegated_renderer_layer_.get(); |
266 } | 266 } |
267 | 267 |
268 // Gets unused resources to recycle to the child compositor. | 268 // Gets unused resources to recycle to the child compositor. |
269 void TakeUnusedResourcesForChildCompositor( | 269 void TakeUnusedResourcesForChildCompositor( |
270 cc::TransferableResourceArray* array); | 270 cc::ReturnedResourceArray* array); |
271 | 271 |
272 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 272 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
273 void SetColor(SkColor color); | 273 void SetColor(SkColor color); |
274 | 274 |
275 // Adds |invalid_rect| to the Layer's pending invalid rect and calls | 275 // Adds |invalid_rect| to the Layer's pending invalid rect and calls |
276 // ScheduleDraw(). Returns false if the paint request is ignored. | 276 // ScheduleDraw(). Returns false if the paint request is ignored. |
277 bool SchedulePaint(const gfx::Rect& invalid_rect); | 277 bool SchedulePaint(const gfx::Rect& invalid_rect); |
278 | 278 |
279 // Schedules a redraw of the layer tree at the compositor. | 279 // Schedules a redraw of the layer tree at the compositor. |
280 // Note that this _does not_ invalidate any region of this layer; use | 280 // Note that this _does not_ invalidate any region of this layer; use |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 // The size of the delegated frame in DIP, set when SetDelegatedFrame was | 486 // The size of the delegated frame in DIP, set when SetDelegatedFrame was |
487 // called. | 487 // called. |
488 gfx::Size delegated_frame_size_in_dip_; | 488 gfx::Size delegated_frame_size_in_dip_; |
489 | 489 |
490 DISALLOW_COPY_AND_ASSIGN(Layer); | 490 DISALLOW_COPY_AND_ASSIGN(Layer); |
491 }; | 491 }; |
492 | 492 |
493 } // namespace ui | 493 } // namespace ui |
494 | 494 |
495 #endif // UI_COMPOSITOR_LAYER_H_ | 495 #endif // UI_COMPOSITOR_LAYER_H_ |
OLD | NEW |