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

Unified Diff: cc/picture.cc

Issue 12221077: Fixing tile grid size used by cc:Picture to make it respect current tile configuration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix for picture_layer_impl_unittest Created 7 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/picture.cc
diff --git a/cc/picture.cc b/cc/picture.cc
index c8fcd4504283733ba585bece04cb52d6e73a9c25..cb4fd00c70eab71e3b61e8ad81ef7aec65a31211 100644
--- a/cc/picture.cc
+++ b/cc/picture.cc
@@ -16,8 +16,6 @@
namespace {
// URI label for a lazily decoded SkPixelRef.
const char labelLazyDecoded[] = "lazy";
-// Tile size in recording coordinates used by SkTileGridPicture
-const int tileGridSize = 256;
}
namespace cc {
@@ -50,14 +48,16 @@ scoped_refptr<Picture> Picture::Clone() const {
}
void Picture::Record(ContentLayerClient* painter,
- RenderingStats* stats) {
+ RenderingStats* stats,
+ gfx::Size tile_grid_size) {
TRACE_EVENT2("cc", "Picture::Record",
"width", layer_rect_.width(), "height", layer_rect_.height());
// Record() should only be called once.
DCHECK(!picture_);
picture_ = skia::AdoptRef(new SkTileGridPicture(
- tileGridSize, tileGridSize, layer_rect_.width(), layer_rect_.height()));
+ tile_grid_size.width(), tile_grid_size.height(),
+ layer_rect_.width(), layer_rect_.height()));
SkCanvas* canvas = picture_->beginRecording(
layer_rect_.width(),
« no previous file with comments | « cc/picture.h ('k') | cc/picture_layer_impl_unittest.cc » ('j') | cc/picture_pile.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698