[go: nahoru, domu]

Change public cc::Layer::SetDrawsContent() to protected UpdateDrawsContent()

SetDrawsContent() should be called from subclasses only (except
that slim::Layer called Layer::SetDrawsContent()), and the parameter
value was always HasDrawableContent(). This CL changes it to protected
to avoid incorrect calls, and renames it to UpdateDrawsContent()
which doesn't have the parameter and calls HasDrawableContent()
internally.

Change-Id: Ic9a912f3275f3d8cb8218a0cc1619f288455aa1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4292120
Reviewed-by: Bo Liu <boliu@chromium.org>
Auto-Submit: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1110092}
diff --git a/cc/slim/ui_resource_layer.cc b/cc/slim/ui_resource_layer.cc
index c199311..fac58b2 100644
--- a/cc/slim/ui_resource_layer.cc
+++ b/cc/slim/ui_resource_layer.cc
@@ -116,7 +116,7 @@
 
   Layer::SetLayerTree(tree);
   RefreshResource();
-  SetDrawsContent(HasDrawableContent());
+  UpdateDrawsContent();
 }
 
 bool UIResourceLayer::HasDrawableContent() const {
@@ -134,7 +134,7 @@
     return;
   }
   resource_id_ = resource_id;
-  SetDrawsContent(HasDrawableContent());
+  UpdateDrawsContent();
   NotifyPropertyChanged();
 }