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

Side by Side Diff: cc/resources/bitmap_skpicture_content_layer_updater.cc

Issue 590313004: Revert of Fix bad scaling in TiledLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « cc/resources/bitmap_content_layer_updater.cc ('k') | cc/resources/content_layer_updater.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/resources/bitmap_skpicture_content_layer_updater.h" 5 #include "cc/resources/bitmap_skpicture_content_layer_updater.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "cc/debug/rendering_stats_instrumentation.h" 8 #include "cc/debug/rendering_stats_instrumentation.h"
9 #include "cc/resources/layer_painter.h" 9 #include "cc/resources/layer_painter.h"
10 #include "cc/resources/prioritized_resource.h" 10 #include "cc/resources/prioritized_resource.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return scoped_ptr<LayerUpdater::Resource>( 65 return scoped_ptr<LayerUpdater::Resource>(
66 new Resource(this, PrioritizedResource::Create(manager))); 66 new Resource(this, PrioritizedResource::Create(manager)));
67 } 67 }
68 68
69 void BitmapSkPictureContentLayerUpdater::PaintContentsRect( 69 void BitmapSkPictureContentLayerUpdater::PaintContentsRect(
70 SkCanvas* canvas, 70 SkCanvas* canvas,
71 const gfx::Rect& source_rect) { 71 const gfx::Rect& source_rect) {
72 if (!canvas) 72 if (!canvas)
73 return; 73 return;
74 // Translate the origin of content_rect to that of source_rect. 74 // Translate the origin of content_rect to that of source_rect.
75 canvas->translate(paint_rect().x() - source_rect.x(), 75 canvas->translate(content_rect().x() - source_rect.x(),
76 paint_rect().y() - source_rect.y()); 76 content_rect().y() - source_rect.y());
77 base::TimeTicks start_time = 77 base::TimeTicks start_time =
78 rendering_stats_instrumentation_->StartRecording(); 78 rendering_stats_instrumentation_->StartRecording();
79 DrawPicture(canvas); 79 DrawPicture(canvas);
80 base::TimeDelta duration = 80 base::TimeDelta duration =
81 rendering_stats_instrumentation_->EndRecording(start_time); 81 rendering_stats_instrumentation_->EndRecording(start_time);
82 rendering_stats_instrumentation_->AddRaster( 82 rendering_stats_instrumentation_->AddRaster(
83 duration, 83 duration,
84 source_rect.width() * source_rect.height()); 84 source_rect.width() * source_rect.height());
85 } 85 }
86 86
87 } // namespace cc 87 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/bitmap_content_layer_updater.cc ('k') | cc/resources/content_layer_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698