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

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

Issue 12093067: Handle ui::Layer's visibility using cc::Layer's m_isDrawable flag (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits Created 7 years, 10 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 | « no previous file | ui/compositor/layer.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 (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
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_;
361 363
364 // Computed based on the visibility of this layer and its ancestors.
365 bool is_drawn_;
366
362 bool force_render_surface_; 367 bool force_render_surface_;
363 368
364 bool fills_bounds_opaquely_; 369 bool fills_bounds_opaquely_;
365 370
366 // If true the layer is always up to date. 371 // If true the layer is always up to date.
367 bool layer_updated_externally_; 372 bool layer_updated_externally_;
368 373
369 // Union of damaged rects, in pixel coordinates, to be used when 374 // Union of damaged rects, in pixel coordinates, to be used when
370 // compositor is ready to paint the content. 375 // compositor is ready to paint the content.
371 SkRegion damaged_region_; 376 SkRegion damaged_region_;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 424
420 // A cached copy of |Compositor::device_scale_factor()|. 425 // A cached copy of |Compositor::device_scale_factor()|.
421 float device_scale_factor_; 426 float device_scale_factor_;
422 427
423 DISALLOW_COPY_AND_ASSIGN(Layer); 428 DISALLOW_COPY_AND_ASSIGN(Layer);
424 }; 429 };
425 430
426 } // namespace ui 431 } // namespace ui
427 432
428 #endif // UI_COMPOSITOR_LAYER_H_ 433 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698