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

Unified Diff: cc/layers/picture_layer_impl.h

Issue 181063022: cc: Trigger GPU rasterization based on a per-layer hint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/picture_layer_impl.h
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index 7f103b1f6b2dc39449997090b8efb9aaa62ae4c9..afa35f1664edb320d4ceb7ccbf74e5ec0ebe145f 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -77,10 +77,8 @@ class CC_EXPORT PictureLayerImpl
virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE;
- void SetShouldUseGpuRasterization(bool should_use_gpu_rasterization);
- bool should_use_gpu_rasterization() const {
- return should_use_gpu_rasterization_;
- }
+ void SetHasGpuRasterizationHint(bool has_hint);
+ bool ShouldUseGpuRasterization() const;
protected:
PictureLayerImpl(LayerTreeImpl* tree_impl, int id);
@@ -89,9 +87,7 @@ class CC_EXPORT PictureLayerImpl
void RemoveAllTilings();
void SyncFromActiveLayer(const PictureLayerImpl* other);
void ManageTilings(bool animating_transform_to_screen);
- bool ShouldHaveLowResTiling() const {
- return !should_use_gpu_rasterization();
- }
+ bool ShouldHaveLowResTiling() const { return !ShouldUseGpuRasterization(); }
virtual bool ShouldAdjustRasterScale(
bool animating_transform_to_screen) const;
virtual void RecalculateRasterScales(
@@ -149,7 +145,7 @@ class CC_EXPORT PictureLayerImpl
// A sanity state check to make sure UpdateTilePriorities only gets called
// after a CalculateContentsScale/ManageTilings.
bool should_update_tile_priorities_;
- bool should_use_gpu_rasterization_;
+ bool has_gpu_rasterization_hint_;
friend class PictureLayer;
DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);

Powered by Google App Engine
This is Rietveld 408576698