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

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: Rolling skia to 7896 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
« no previous file with comments | « cc/picture.h ('k') | cc/picture_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture.cc
diff --git a/cc/picture.cc b/cc/picture.cc
index c8fd76ffde70a01830f300dda033c40b37ee4ec9..dbb2b080e82c4c2a45369a2d496587edfed68568 100644
--- a/cc/picture.cc
+++ b/cc/picture.cc
@@ -9,7 +9,6 @@
#include "skia/ext/analysis_canvas.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkData.h"
-#include "third_party/skia/include/core/SkTileGridPicture.h"
#include "third_party/skia/include/utils/SkPictureUtils.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/skia_util.h"
@@ -17,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 {
@@ -51,14 +48,16 @@ scoped_refptr<Picture> Picture::Clone() const {
}
void Picture::Record(ContentLayerClient* painter,
- RenderingStats* stats) {
+ RenderingStats* stats,
+ const SkTileGridPicture::TileGridInfo& tileGridInfo) {
TRACE_EVENT2("cc", "Picture::Record",
"width", layer_rect_.width(), "height", layer_rect_.height());
// Record() should only be called once.
DCHECK(!picture_);
+ DCHECK(!tileGridInfo.fTileInterval.isEmpty());
picture_ = skia::AdoptRef(new SkTileGridPicture(
- tileGridSize, tileGridSize, layer_rect_.width(), layer_rect_.height()));
+ layer_rect_.width(), layer_rect_.height(), tileGridInfo));
SkCanvas* canvas = picture_->beginRecording(
layer_rect_.width(),
« no previous file with comments | « cc/picture.h ('k') | cc/picture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698