| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 gfx::Size frame_size_in_dip); | 266 gfx::Size frame_size_in_dip); |
| 267 | 267 |
| 268 bool has_external_content() { | 268 bool has_external_content() { |
| 269 return texture_layer_.get() || delegated_renderer_layer_.get(); | 269 return texture_layer_.get() || delegated_renderer_layer_.get(); |
| 270 } | 270 } |
| 271 | 271 |
| 272 // Gets unused resources to recycle to the child compositor. | 272 // Gets unused resources to recycle to the child compositor. |
| 273 void TakeUnusedResourcesForChildCompositor( | 273 void TakeUnusedResourcesForChildCompositor( |
| 274 cc::ReturnedResourceArray* array); | 274 cc::ReturnedResourceArray* array); |
| 275 | 275 |
| 276 void SetShowPaintedContent(); |
| 277 |
| 276 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 278 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
| 277 void SetColor(SkColor color); | 279 void SetColor(SkColor color); |
| 278 | 280 |
| 279 // Adds |invalid_rect| to the Layer's pending invalid rect and calls | 281 // Adds |invalid_rect| to the Layer's pending invalid rect and calls |
| 280 // ScheduleDraw(). Returns false if the paint request is ignored. | 282 // ScheduleDraw(). Returns false if the paint request is ignored. |
| 281 bool SchedulePaint(const gfx::Rect& invalid_rect); | 283 bool SchedulePaint(const gfx::Rect& invalid_rect); |
| 282 | 284 |
| 283 // Schedules a redraw of the layer tree at the compositor. | 285 // Schedules a redraw of the layer tree at the compositor. |
| 284 // Note that this _does not_ invalidate any region of this layer; use | 286 // Note that this _does not_ invalidate any region of this layer; use |
| 285 // SchedulePaint() for that. | 287 // SchedulePaint() for that. |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 // The size of the delegated frame in DIP, set when SetDelegatedFrame was | 497 // The size of the delegated frame in DIP, set when SetDelegatedFrame was |
| 496 // called. | 498 // called. |
| 497 gfx::Size delegated_frame_size_in_dip_; | 499 gfx::Size delegated_frame_size_in_dip_; |
| 498 | 500 |
| 499 DISALLOW_COPY_AND_ASSIGN(Layer); | 501 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 500 }; | 502 }; |
| 501 | 503 |
| 502 } // namespace ui | 504 } // namespace ui |
| 503 | 505 |
| 504 #endif // UI_COMPOSITOR_LAYER_H_ | 506 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |