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

Unified Diff: cc/resources/skpicture_content_layer_updater.cc

Issue 567743003: Fix bad scaling in TiledLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk Created 6 years, 3 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/resources/skpicture_content_layer_updater.h ('k') | cc/test/fake_content_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/skpicture_content_layer_updater.cc
diff --git a/cc/resources/skpicture_content_layer_updater.cc b/cc/resources/skpicture_content_layer_updater.cc
index 7e8ffee26619e3d7032847590d1bb7f031d53371..bd524f235f1cd53a6b947236dead75c17412592f 100644
--- a/cc/resources/skpicture_content_layer_updater.cc
+++ b/cc/resources/skpicture_content_layer_updater.cc
@@ -23,23 +23,27 @@ SkPictureContentLayerUpdater::SkPictureContentLayerUpdater(
SkPictureContentLayerUpdater::~SkPictureContentLayerUpdater() {}
void SkPictureContentLayerUpdater::PrepareToUpdate(
- const gfx::Rect& content_rect,
- const gfx::Size&,
+ const gfx::Size& content_size,
+ const gfx::Rect& paint_rect,
+ const gfx::Size& tile_size,
float contents_width_scale,
float contents_height_scale) {
SkPictureRecorder recorder;
- SkCanvas* canvas = recorder.beginRecording(
- content_rect.width(), content_rect.height(), NULL, 0);
- DCHECK_EQ(content_rect.width(), canvas->getBaseLayerSize().width());
- DCHECK_EQ(content_rect.height(), canvas->getBaseLayerSize().height());
+ SkCanvas* canvas =
+ recorder.beginRecording(paint_rect.width(), paint_rect.height(), NULL, 0);
+ DCHECK_EQ(paint_rect.width(), canvas->getBaseLayerSize().width());
+ DCHECK_EQ(paint_rect.height(), canvas->getBaseLayerSize().height());
base::TimeTicks start_time =
rendering_stats_instrumentation_->StartRecording();
- PaintContents(
- canvas, content_rect, contents_width_scale, contents_height_scale);
+ PaintContents(canvas,
+ content_size,
+ paint_rect,
+ contents_width_scale,
+ contents_height_scale);
base::TimeDelta duration =
rendering_stats_instrumentation_->EndRecording(start_time);
rendering_stats_instrumentation_->AddRecord(
- duration, content_rect.width() * content_rect.height());
+ duration, paint_rect.width() * paint_rect.height());
picture_ = skia::AdoptRef(recorder.endRecording());
}
« no previous file with comments | « cc/resources/skpicture_content_layer_updater.h ('k') | cc/test/fake_content_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698