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

Unified Diff: cc/layers/picture_image_layer.cc

Issue 1835523002: cc: Add LayerTreeSetting to disable cached picture raster. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use LayerTreeSettings for cached picture raster. Created 4 years, 9 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 | « no previous file | cc/layers/picture_image_layer_unittest.cc » ('j') | cc/layers/picture_image_layer_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_image_layer.cc
diff --git a/cc/layers/picture_image_layer.cc b/cc/layers/picture_image_layer.cc
index 3c17c8c3bbae66f9607a31e4161e7e4793f89377..64d71a534459184c005a2228452e2c91644aa78d 100644
--- a/cc/layers/picture_image_layer.cc
+++ b/cc/layers/picture_image_layer.cc
@@ -9,6 +9,7 @@
#include "cc/layers/picture_image_layer_impl.h"
#include "cc/playback/display_item_list_settings.h"
#include "cc/playback/drawing_display_item.h"
+#include "cc/trees/layer_tree_host.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
@@ -57,11 +58,11 @@ scoped_refptr<DisplayItemList> PictureImageLayer::PaintContentsToDisplayList(
DCHECK(image_);
DCHECK_GT(image_->width(), 0);
DCHECK_GT(image_->height(), 0);
+ DCHECK(layer_tree_host());
- // Picture image layers can be used with GatherPixelRefs, so cached SkPictures
- // are currently required.
DisplayItemListSettings settings;
- settings.use_cached_picture = true;
+ settings.use_cached_picture =
+ layer_tree_host()->settings().use_cached_picture_raster;
scoped_refptr<DisplayItemList> display_list =
DisplayItemList::Create(PaintableRegion(), settings);
« no previous file with comments | « no previous file | cc/layers/picture_image_layer_unittest.cc » ('j') | cc/layers/picture_image_layer_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698