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

Unified Diff: cc/picture_pile_impl.cc

Issue 11421210: cc: Apply contents scales to impl-side painting rasterization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years 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_pile_impl.h ('k') | cc/test/fake_picture_layer_tiling_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture_pile_impl.cc
diff --git a/cc/picture_pile_impl.cc b/cc/picture_pile_impl.cc
index 216643bf84b84b4745d56a2d750351b56ed60e59..530a97e5608b9a29fb3d96bb01ae4c7385a9f414 100644
--- a/cc/picture_pile_impl.cc
+++ b/cc/picture_pile_impl.cc
@@ -30,8 +30,11 @@ scoped_refptr<PicturePileImpl> PicturePileImpl::CloneForDrawing() const {
return clone;
}
-void PicturePileImpl::Raster(SkCanvas* canvas, gfx::Rect rect,
- RenderingStats* stats) {
+void PicturePileImpl::Raster(
+ SkCanvas* canvas,
+ gfx::Rect rect,
+ float contents_scale,
+ RenderingStats* stats) {
base::TimeTicks rasterizeBeginTime = base::TimeTicks::Now();
// TODO(enne): do this more efficiently, i.e. top down with Skia clips
@@ -40,6 +43,7 @@ void PicturePileImpl::Raster(SkCanvas* canvas, gfx::Rect rect,
SkRect layer_skrect = SkRect::MakeXYWH(rect.x(), rect.y(),
rect.width(), rect.height());
canvas->clipRect(layer_skrect);
+ canvas->scale(contents_scale, contents_scale);
for (PicturePile::Pile::const_iterator i = pile_.begin();
i != pile_.end(); ++i) {
if (!(*i)->LayerRect().Intersects(rect))
« no previous file with comments | « cc/picture_pile_impl.h ('k') | cc/test/fake_picture_layer_tiling_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698