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

Unified Diff: cc/playback/raster_source.cc

Issue 1848613002: Extract subpixel offsets from composited layer transforms when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/playback/raster_source.h ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/raster_source.cc
diff --git a/cc/playback/raster_source.cc b/cc/playback/raster_source.cc
index 091c40a2bde84468b0b6430f3c497bd1d9b60248..5c427217041d949a4b150bb4452cc5d03d6ce363 100644
--- a/cc/playback/raster_source.cc
+++ b/cc/playback/raster_source.cc
@@ -69,7 +69,8 @@ RasterSource::RasterSource(const RasterSource* other, bool can_use_lcd_text)
other->slow_down_raster_scale_factor_for_debug_),
should_attempt_to_use_distance_field_text_(
other->should_attempt_to_use_distance_field_text_),
- image_decode_controller_(other->image_decode_controller_) {
+ image_decode_controller_(other->image_decode_controller_),
+ subpixel_offset_(other->subpixel_offset_) {
// In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview).
// Don't register a dump provider in these cases.
// TODO(ericrk): Get this working in Android Webview. crbug.com/517156
@@ -234,6 +235,8 @@ void RasterSource::RasterCommon(SkCanvas* canvas,
const gfx::Rect& canvas_playback_rect,
float contents_scale) const {
canvas->translate(-canvas_bitmap_rect.x(), -canvas_bitmap_rect.y());
+ LOG(ERROR) << "subpixel_offset: " << this << ": " << subpixel_offset_.ToString() << ": " << GetSize().ToString();
+ canvas->translate(subpixel_offset_.x(), subpixel_offset_.y());
gfx::Rect content_rect =
gfx::ScaleToEnclosingRect(gfx::Rect(size_), contents_scale);
content_rect.Intersect(canvas_playback_rect);
« no previous file with comments | « cc/playback/raster_source.h ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698