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

Side by Side Diff: cc/playback/display_list_raster_source.cc

Issue 1314943008: cc: Remove implicit conversions from Rect to RectF in src/cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/playback/display_list_raster_source.h" 5 #include "cc/playback/display_list_raster_source.h"
6 6
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "cc/base/region.h" 8 #include "cc/base/region.h"
9 #include "cc/debug/debug_colors.h" 9 #include "cc/debug/debug_colors.h"
10 #include "cc/playback/display_item_list.h" 10 #include "cc/playback/display_item_list.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 102
103 void DisplayListRasterSource::RasterCommon( 103 void DisplayListRasterSource::RasterCommon(
104 SkCanvas* canvas, 104 SkCanvas* canvas,
105 SkPicture::AbortCallback* callback, 105 SkPicture::AbortCallback* callback,
106 const gfx::Rect& canvas_bitmap_rect, 106 const gfx::Rect& canvas_bitmap_rect,
107 const gfx::Rect& canvas_playback_rect, 107 const gfx::Rect& canvas_playback_rect,
108 float contents_scale) const { 108 float contents_scale) const {
109 canvas->translate(-canvas_bitmap_rect.x(), -canvas_bitmap_rect.y()); 109 canvas->translate(-canvas_bitmap_rect.x(), -canvas_bitmap_rect.y());
110 gfx::Rect content_rect = 110 gfx::Rect content_rect =
111 gfx::ToEnclosingRect(gfx::ScaleRect(gfx::Rect(size_), contents_scale)); 111 gfx::ScaleToEnclosingRect(gfx::Rect(size_), contents_scale);
112 content_rect.Intersect(canvas_playback_rect); 112 content_rect.Intersect(canvas_playback_rect);
113 113
114 canvas->clipRect(gfx::RectToSkRect(content_rect), SkRegion::kIntersect_Op); 114 canvas->clipRect(gfx::RectToSkRect(content_rect), SkRegion::kIntersect_Op);
115 115
116 DCHECK(display_list_.get()); 116 DCHECK(display_list_.get());
117 gfx::Rect canvas_target_playback_rect = 117 gfx::Rect canvas_target_playback_rect =
118 canvas_playback_rect - canvas_bitmap_rect.OffsetFromOrigin(); 118 canvas_playback_rect - canvas_bitmap_rect.OffsetFromOrigin();
119 int repeat_count = std::max(1, slow_down_raster_scale_factor_for_debug_); 119 int repeat_count = std::max(1, slow_down_raster_scale_factor_for_debug_);
120 for (int i = 0; i < repeat_count; ++i) { 120 for (int i = 0; i < repeat_count; ++i) {
121 display_list_->Raster(canvas, callback, canvas_target_playback_rect, 121 display_list_->Raster(canvas, callback, canvas_target_playback_rect,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 223
224 scoped_refptr<RasterSource> DisplayListRasterSource::CreateCloneWithoutLCDText() 224 scoped_refptr<RasterSource> DisplayListRasterSource::CreateCloneWithoutLCDText()
225 const { 225 const {
226 bool can_use_lcd_text = false; 226 bool can_use_lcd_text = false;
227 return scoped_refptr<RasterSource>( 227 return scoped_refptr<RasterSource>(
228 new DisplayListRasterSource(this, can_use_lcd_text)); 228 new DisplayListRasterSource(this, can_use_lcd_text));
229 } 229 }
230 230
231 } // namespace cc 231 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698