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

Unified Diff: trunk/src/cc/resources/content_layer_updater.cc

Issue 100923002: Revert 225751 "BitmapContentLayerUpdater shouldn't reallocate bi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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
Index: trunk/src/cc/resources/content_layer_updater.cc
===================================================================
--- trunk/src/cc/resources/content_layer_updater.cc (revision 238278)
+++ trunk/src/cc/resources/content_layer_updater.cc (working copy)
@@ -35,22 +35,20 @@
}
void ContentLayerUpdater::PaintContents(SkCanvas* canvas,
- gfx::Rect content_rect,
+ gfx::Point origin,
float contents_width_scale,
float contents_height_scale,
gfx::Rect* resulting_opaque_rect) {
- TRACE_EVENT2("cc",
- "ContentLayerUpdater::PaintContents",
- "width",
- content_rect.width(),
- "height",
- content_rect.height());
- gfx::Point origin = content_rect.origin();
+ TRACE_EVENT0("cc", "ContentLayerUpdater::PaintContents");
canvas->save();
canvas->translate(SkFloatToScalar(-origin.x()),
SkFloatToScalar(-origin.y()));
+ SkBaseDevice* device = canvas->getDevice();
+ gfx::Rect content_rect(origin, gfx::Size(device->width(), device->height()));
+
gfx::Rect layer_rect = content_rect;
+
if (contents_width_scale != 1.f || contents_height_scale != 1.f) {
canvas->scale(SkFloatToScalar(contents_width_scale),
SkFloatToScalar(contents_height_scale));
« no previous file with comments | « trunk/src/cc/resources/content_layer_updater.h ('k') | trunk/src/cc/resources/skpicture_content_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698