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

Unified Diff: cc/tile_manager.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/tile.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_manager.cc
diff --git a/cc/tile_manager.cc b/cc/tile_manager.cc
index 5eface4e7d9bfc6fa4e6fdadcd503ed2f02d368e..fe3456541eb83ea25fa162425a42934420bc3ef1 100644
--- a/cc/tile_manager.cc
+++ b/cc/tile_manager.cc
@@ -24,6 +24,7 @@ namespace {
void RasterizeTile(cc::PicturePileImpl* picture_pile,
uint8_t* mapped_buffer,
const gfx::Rect& rect,
+ float contents_scale,
cc::RenderingStats* stats) {
TRACE_EVENT0("cc", "RasterizeTile");
DCHECK(mapped_buffer);
@@ -33,7 +34,11 @@ void RasterizeTile(cc::PicturePileImpl* picture_pile,
bitmap.setPixels(mapped_buffer);
SkDevice device(bitmap);
SkCanvas canvas(&device);
- picture_pile->Raster(&canvas, rect, stats);
+ picture_pile->Raster(
+ &canvas,
+ rect,
+ contents_scale,
+ stats);
}
const int kMaxRasterThreads = 64;
@@ -338,6 +343,7 @@ void TileManager::DispatchOneRasterTask(scoped_refptr<Tile> tile) {
resource_pool_->resource_provider()->mapPixelBuffer(
resource_id),
tile->rect_inside_picture_,
+ tile->contents_scale(),
stats),
base::Bind(&TileManager::OnRasterTaskCompleted,
base::Unretained(this),
« no previous file with comments | « cc/tile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698