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

Unified Diff: cc/picture_pile_base.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: fixing unit test build 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
« cc/picture_layer.cc ('K') | « cc/picture_pile_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture_pile_base.cc
diff --git a/cc/picture_pile_base.cc b/cc/picture_pile_base.cc
index 94983847afcc63ff943c57bb82b547c3a160243e..09134d518cee22e313ccb5eccc83e2c1c96c0c37 100644
--- a/cc/picture_pile_base.cc
+++ b/cc/picture_pile_base.cc
@@ -10,6 +10,7 @@ namespace {
// Dimensions of the tiles in this picture pile as well as the dimensions of
// the base picture in each tile.
const int kBasePictureSize = 3000;
+const int kDefaultTileGridStride = 254;
}
namespace cc {
@@ -17,6 +18,7 @@ namespace cc {
PicturePileBase::PicturePileBase()
: min_contents_scale_(0) {
tiling_.SetMaxTextureSize(gfx::Size(kBasePictureSize, kBasePictureSize));
+ tile_grid_stride_.SetSize(kDefaultTileGridStride, kDefaultTileGridStride);
}
PicturePileBase::~PicturePileBase() {
@@ -67,6 +69,12 @@ void PicturePileBase::SetMinContentsScale(float min_contents_scale) {
min_contents_scale_ = min_contents_scale;
}
+void PicturePileBase::SetTileGridStride(gfx::Size tile_grid_stride) {
+ DCHECK(tile_grid_stride.width() > 0);
+ DCHECK(tile_grid_stride.height() > 0);
+ tile_grid_stride_ = tile_grid_stride;
+}
+
void PicturePileBase::SetBufferPixels(int new_buffer_pixels) {
if (new_buffer_pixels == buffer_pixels())
return;
@@ -84,6 +92,7 @@ void PicturePileBase::PushPropertiesTo(PicturePileBase* other) {
other->tiling_ = tiling_;
other->recorded_region_ = recorded_region_;
other->min_contents_scale_ = min_contents_scale_;
+ other->tile_grid_stride_ = tile_grid_stride_;
}
void PicturePileBase::UpdateRecordedRegion() {
« cc/picture_layer.cc ('K') | « cc/picture_pile_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698