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

Side by Side Diff: cc/layers/layer_impl.h

Issue 2899403003: cc: Give non-drawing layers that are rasterized a lower priority. (Closed)
Patch Set: type Created 3 years, 7 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 | cc/layers/layer_impl.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 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 CC_LAYERS_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 return has_will_change_transform_hint_; 433 return has_will_change_transform_hint_;
434 } 434 }
435 435
436 MutatorHost* GetMutatorHost() const; 436 MutatorHost* GetMutatorHost() const;
437 437
438 ElementListType GetElementTypeForAnimation() const; 438 ElementListType GetElementTypeForAnimation() const;
439 439
440 void set_needs_show_scrollbars(bool yes) { needs_show_scrollbars_ = yes; } 440 void set_needs_show_scrollbars(bool yes) { needs_show_scrollbars_ = yes; }
441 bool needs_show_scrollbars() { return needs_show_scrollbars_; } 441 bool needs_show_scrollbars() { return needs_show_scrollbars_; }
442 442
443 void set_raster_even_if_not_in_rsll(bool yes) { 443 void set_raster_even_if_not_drawn(bool yes) {
444 raster_even_if_not_in_rsll_ = yes; 444 raster_even_if_not_drawn_ = yes;
445 } 445 }
446 bool raster_even_if_not_in_rsll() const { 446 bool raster_even_if_not_drawn() const { return raster_even_if_not_drawn_; }
447 return raster_even_if_not_in_rsll_;
448 }
449 447
450 protected: 448 protected:
451 LayerImpl(LayerTreeImpl* layer_impl, 449 LayerImpl(LayerTreeImpl* layer_impl,
452 int id, 450 int id,
453 scoped_refptr<SyncedScrollOffset> scroll_offset); 451 scoped_refptr<SyncedScrollOffset> scroll_offset);
454 LayerImpl(LayerTreeImpl* layer_impl, int id); 452 LayerImpl(LayerTreeImpl* layer_impl, int id);
455 453
456 // Get the color and size of the layer's debug border. 454 // Get the color and size of the layer's debug border.
457 virtual void GetDebugBorderProperties(SkColor* color, float* width) const; 455 virtual void GetDebugBorderProperties(SkColor* color, float* width) const;
458 456
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 555
558 bool has_will_change_transform_hint_ : 1; 556 bool has_will_change_transform_hint_ : 1;
559 bool needs_push_properties_ : 1; 557 bool needs_push_properties_ : 1;
560 bool scrollbars_hidden_ : 1; 558 bool scrollbars_hidden_ : 1;
561 559
562 // The needs_show_scrollbars_ bit tracks a pending request from Blink to show 560 // The needs_show_scrollbars_ bit tracks a pending request from Blink to show
563 // the overlay scrollbars. It's set on the scroll layer (not the scrollbar 561 // the overlay scrollbars. It's set on the scroll layer (not the scrollbar
564 // layers) and consumed by LayerTreeImpl::PushPropertiesTo during activation. 562 // layers) and consumed by LayerTreeImpl::PushPropertiesTo during activation.
565 bool needs_show_scrollbars_ : 1; 563 bool needs_show_scrollbars_ : 1;
566 564
567 bool raster_even_if_not_in_rsll_ : 1; 565 // This is set for layers that have a property because of which they are not
566 // drawn (singular transforms), but they can become visible soon (the property
567 // is being animated). For this reason, while these layers are not drawn, they
568 // are still rasterized.
569 bool raster_even_if_not_drawn_ : 1;
568 570
569 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 571 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
570 }; 572 };
571 573
572 } // namespace cc 574 } // namespace cc
573 575
574 #endif // CC_LAYERS_LAYER_IMPL_H_ 576 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698