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

Unified Diff: cc/resources/tile_manager.cc

Issue 14690020: cc: Don't consider padding for analysis. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: predictor benchmarking change Created 7 years, 7 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/picture_pile_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.cc
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index bfa0a696c4b304cfc41f51d99495db5467998b68..6a068a134bd94b68e9c727ab703c4ea5c2a0cded 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -18,6 +18,7 @@
#include "cc/resources/resource_pool.h"
#include "cc/resources/tile.h"
#include "third_party/skia/include/core/SkDevice.h"
+#include "ui/gfx/rect_conversions.h"
namespace cc {
@@ -853,9 +854,13 @@ void TileManager::RunAnalyzeTask(
analysis->is_solid_color &= use_color_estimator;
if (metadata.prediction_benchmarking) {
- SkDevice device(SkBitmap::kARGB_8888_Config, rect.width(), rect.height());
+ gfx::Rect layer_rect = gfx::ToEnclosingRect(
+ gfx::ScaleRect(rect, 1.0f / contents_scale));
+
+ SkDevice device(
+ SkBitmap::kARGB_8888_Config, layer_rect.width(), layer_rect.height());
SkCanvas canvas(&device);
- picture_pile->Raster(&canvas, rect, contents_scale, NULL);
+ picture_pile->Raster(&canvas, layer_rect, 1.0f, NULL);
const SkBitmap bitmap = device.accessBitmap(false);
DCHECK_EQ(bitmap.rowBytes(),
« no previous file with comments | « cc/resources/picture_pile_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698