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

Unified Diff: cc/raster/raster_source.cc

Issue 2849953004: SV Test
Patch Set: Created 3 years, 8 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/raster/raster_source.h ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/raster/raster_source.cc
diff --git a/cc/raster/raster_source.cc b/cc/raster/raster_source.cc
index b1443e61770bb86447f10ee2f56c2b1614022127..757270cc823e87cd6bc549a55eff7dcf792b8b40 100644
--- a/cc/raster/raster_source.cc
+++ b/cc/raster/raster_source.cc
@@ -80,7 +80,7 @@ void RasterSource::PlaybackToCanvas(
raster_canvas->clipRect(SkRect::MakeFromIRect(raster_bounds));
raster_canvas->translate(raster_transform.translation().x(),
raster_transform.translation().y());
- raster_canvas->scale(raster_transform.scale(), raster_transform.scale());
+ // raster_canvas->scale(raster_transform.scale(), raster_transform.scale());
PlaybackToCanvas(raster_canvas, target_color_space, settings);
raster_canvas->restore();
}
@@ -238,17 +238,15 @@ size_t RasterSource::GetMemoryUsage() const {
painter_reported_memory_usage_;
}
-bool RasterSource::PerformSolidColorAnalysis(const gfx::Rect& content_rect,
+bool RasterSource::PerformSolidColorAnalysis(gfx::Rect content_rect,
float contents_scale,
SkColor* color) const {
TRACE_EVENT0("cc", "RasterSource::PerformSolidColorAnalysis");
- gfx::Rect layer_rect =
- gfx::ScaleToEnclosingRect(content_rect, 1.f / contents_scale);
-
- layer_rect.Intersect(gfx::Rect(size_));
- skia::AnalysisCanvas canvas(layer_rect.width(), layer_rect.height());
- canvas.translate(-layer_rect.x(), -layer_rect.y());
+ content_rect.Intersect(
+ gfx::ScaleToEnclosingRect(gfx::Rect(size_), contents_scale));
+ skia::AnalysisCanvas canvas(content_rect.width(), content_rect.height());
+ canvas.translate(-content_rect.x(), -content_rect.y());
// Note that because no color conversion is applied to solid color analysis,
// the resulting solid color will be known to be sRGB.
RasterCommon(&canvas, &canvas);
« no previous file with comments | « cc/raster/raster_source.h ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698