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

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

Issue 1138923005: Remove SK_LEGACY_DRAWPICTURECALLBACK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: analysis_canvas_unittest fix Created 5 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 unified diff | Download patch
« no previous file with comments | « cc/playback/display_list_raster_source.h ('k') | cc/playback/drawing_display_item.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 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 const gfx::Rect& canvas_rect, 100 const gfx::Rect& canvas_rect,
101 float contents_scale) const { 101 float contents_scale) const {
102 RasterSourceHelper::PrepareForPlaybackToCanvas( 102 RasterSourceHelper::PrepareForPlaybackToCanvas(
103 canvas, canvas_rect, gfx::Rect(size_), contents_scale, background_color_, 103 canvas, canvas_rect, gfx::Rect(size_), contents_scale, background_color_,
104 clear_canvas_with_debug_color_, requires_clear_); 104 clear_canvas_with_debug_color_, requires_clear_);
105 105
106 RasterCommon(canvas, NULL, canvas_rect, contents_scale); 106 RasterCommon(canvas, NULL, canvas_rect, contents_scale);
107 } 107 }
108 108
109 void DisplayListRasterSource::RasterCommon(SkCanvas* canvas, 109 void DisplayListRasterSource::RasterCommon(SkCanvas* canvas,
110 SkDrawPictureCallback* callback, 110 SkPicture::AbortCallback* callback,
111 const gfx::Rect& canvas_rect, 111 const gfx::Rect& canvas_rect,
112 float contents_scale) const { 112 float contents_scale) const {
113 canvas->translate(-canvas_rect.x(), -canvas_rect.y()); 113 canvas->translate(-canvas_rect.x(), -canvas_rect.y());
114 gfx::Rect content_rect = 114 gfx::Rect content_rect =
115 gfx::ToEnclosingRect(gfx::ScaleRect(gfx::Rect(size_), contents_scale)); 115 gfx::ToEnclosingRect(gfx::ScaleRect(gfx::Rect(size_), contents_scale));
116 content_rect.Intersect(canvas_rect); 116 content_rect.Intersect(canvas_rect);
117 117
118 canvas->clipRect(gfx::RectToSkRect(content_rect), SkRegion::kIntersect_Op); 118 canvas->clipRect(gfx::RectToSkRect(content_rect), SkRegion::kIntersect_Op);
119 119
120 DCHECK(display_list_.get()); 120 DCHECK(display_list_.get());
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 scoped_refptr<RasterSource> DisplayListRasterSource::CreateCloneWithoutLCDText() 228 scoped_refptr<RasterSource> DisplayListRasterSource::CreateCloneWithoutLCDText()
229 const { 229 const {
230 bool can_use_lcd_text = false; 230 bool can_use_lcd_text = false;
231 return scoped_refptr<RasterSource>( 231 return scoped_refptr<RasterSource>(
232 new DisplayListRasterSource(this, can_use_lcd_text)); 232 new DisplayListRasterSource(this, can_use_lcd_text));
233 } 233 }
234 234
235 } // namespace cc 235 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/display_list_raster_source.h ('k') | cc/playback/drawing_display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698