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

Unified Diff: cc/layers/picture_layer_impl.h

Issue 270823003: cc: Move gpu rasterization flag from LayerImpl to LayerTreeImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.h
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index b559e3d491af7ae4246907b22d6487759cc388bb..80d09dde721ad2e533c11d819f4241e986c6327c 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -14,6 +14,7 @@
#include "cc/resources/picture_layer_tiling.h"
#include "cc/resources/picture_layer_tiling_set.h"
#include "cc/resources/picture_pile_impl.h"
+#include "cc/trees/layer_tree_impl.h"
#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkPicture.h"
@@ -131,8 +132,9 @@ class CC_EXPORT PictureLayerImpl
virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE;
- void SetUseGpuRasterization(bool use_gpu);
- bool ShouldUseGpuRasterization() const { return use_gpu_rasterization_; }
+ bool use_gpu_rasterization() const {
+ return layer_tree_impl()->use_gpu_rasterization();
+ }
// Functions used by tile manager.
void DidUnregisterLayer();
@@ -151,7 +153,7 @@ class CC_EXPORT PictureLayerImpl
void ManageTilings(bool animating_transform_to_screen,
float maximum_animation_contents_scale);
bool ShouldHaveLowResTiling() const {
- return should_use_low_res_tiling_ && !ShouldUseGpuRasterization();
+ return should_use_low_res_tiling_ && !use_gpu_rasterization();
}
virtual bool ShouldAdjustRasterScale(
bool animating_transform_to_screen) const;
@@ -212,7 +214,6 @@ class CC_EXPORT PictureLayerImpl
// after a CalculateContentsScale/ManageTilings.
bool should_update_tile_priorities_;
bool should_use_low_res_tiling_;
- bool use_gpu_rasterization_;
bool layer_needs_to_register_itself_;
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698