Index: views/view.h |
diff --git a/views/view.h b/views/view.h |
index c188531537a91bf0919c72854bf614d7a504dafb..60a534c460352bab074c7f7152bf2cd7ba72e1ca 100644 |
--- a/views/view.h |
+++ b/views/view.h |
@@ -259,6 +259,11 @@ class VIEWS_EXPORT View : public AcceleratorTarget { |
// painting. |
void SetFillsBoundsOpaquely(bool fills_bounds_opaquely); |
+ // Used to disable painting (e.g., during an animation when expensive |
+ // operations like painting can cause noticeable jank). |
+ void set_painting_enabled(bool enabled) { painting_enabled_ = enabled; } |
+ bool painting_enabled() const { return painting_enabled_; } |
+ |
// Transformations ----------------------------------------------------------- |
// Methods for setting transformations for a view (e.g. rotation, scaling). |
@@ -1353,6 +1358,9 @@ class VIEWS_EXPORT View : public AcceleratorTarget { |
// Whether this view is enabled. |
bool enabled_; |
+ // Whether this view is painting. |
+ bool painting_enabled_; |
+ |
// Whether or not RegisterViewForVisibleBoundsNotification on the RootView |
// has been invoked. |
bool registered_for_visible_bounds_notification_; |