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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
334 void CreateWebLayer(); | 334 void CreateWebLayer(); |
335 void RecomputeTransform(); | 335 void RecomputeTransform(); |
336 void RecomputeDrawsContentAndUVRect(); | 336 void RecomputeDrawsContentAndUVRect(); |
337 | 337 |
338 // Set all filters which got applied to the layer. | 338 // Set all filters which got applied to the layer. |
339 void SetLayerFilters(); | 339 void SetLayerFilters(); |
340 | 340 |
341 // Set all filters which got applied to the layer background. | 341 // Set all filters which got applied to the layer background. |
342 void SetLayerBackgroundFilters(); | 342 void SetLayerBackgroundFilters(); |
343 | 343 |
344 void UpdateIsDrawn(); | |
345 | |
344 const LayerType type_; | 346 const LayerType type_; |
345 | 347 |
346 Compositor* compositor_; | 348 Compositor* compositor_; |
347 | 349 |
348 scoped_refptr<ui::Texture> texture_; | 350 scoped_refptr<ui::Texture> texture_; |
349 | 351 |
350 Layer* parent_; | 352 Layer* parent_; |
351 | 353 |
352 // This layer's children, in bottom-to-top stacking order. | 354 // This layer's children, in bottom-to-top stacking order. |
353 std::vector<Layer*> children_; | 355 std::vector<Layer*> children_; |
354 | 356 |
355 gfx::Transform transform_; | 357 gfx::Transform transform_; |
356 | 358 |
357 gfx::Rect bounds_; | 359 gfx::Rect bounds_; |
358 | 360 |
359 // Visibility of this layer. See SetVisible/IsDrawn for more details. | 361 // Visibility of this layer. See SetVisible/IsDrawn for more details. |
360 bool visible_; | 362 bool visible_; |
363 bool is_drawn_; | |
piman
2013/02/01 18:06:55
nit: can you just add comment that explains that t
ajuma
2013/02/01 18:40:24
Done.
| |
361 | 364 |
362 bool force_render_surface_; | 365 bool force_render_surface_; |
363 | 366 |
364 bool fills_bounds_opaquely_; | 367 bool fills_bounds_opaquely_; |
365 | 368 |
366 // If true the layer is always up to date. | 369 // If true the layer is always up to date. |
367 bool layer_updated_externally_; | 370 bool layer_updated_externally_; |
368 | 371 |
369 // Union of damaged rects, in pixel coordinates, to be used when | 372 // Union of damaged rects, in pixel coordinates, to be used when |
370 // compositor is ready to paint the content. | 373 // compositor is ready to paint the content. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
419 | 422 |
420 // A cached copy of |Compositor::device_scale_factor()|. | 423 // A cached copy of |Compositor::device_scale_factor()|. |
421 float device_scale_factor_; | 424 float device_scale_factor_; |
422 | 425 |
423 DISALLOW_COPY_AND_ASSIGN(Layer); | 426 DISALLOW_COPY_AND_ASSIGN(Layer); |
424 }; | 427 }; |
425 | 428 |
426 } // namespace ui | 429 } // namespace ui |
427 | 430 |
428 #endif // UI_COMPOSITOR_LAYER_H_ | 431 #endif // UI_COMPOSITOR_LAYER_H_ |
OLD | NEW |