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

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

Issue 2668873002: cc: Add checker-imaging support to TileManager. (Closed)
Patch Set: remove include Created 3 years, 10 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/raster_source.h ('k') | cc/test/fake_layer_tree_host_impl.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/raster_source.h" 5 #include "cc/playback/raster_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 void RasterSource::PlaybackToCanvas(SkCanvas* raster_canvas, 83 void RasterSource::PlaybackToCanvas(SkCanvas* raster_canvas,
84 const PlaybackSettings& settings) const { 84 const PlaybackSettings& settings) const {
85 if (!settings.playback_to_shared_canvas) 85 if (!settings.playback_to_shared_canvas)
86 PrepareForPlaybackToCanvas(raster_canvas); 86 PrepareForPlaybackToCanvas(raster_canvas);
87 87
88 if (settings.skip_images) { 88 if (settings.skip_images) {
89 SkipImageCanvas canvas(raster_canvas); 89 SkipImageCanvas canvas(raster_canvas);
90 RasterCommon(&canvas, nullptr); 90 RasterCommon(&canvas, nullptr);
91 } else if (settings.use_image_hijack_canvas) { 91 } else if (settings.use_image_hijack_canvas) {
92 const SkImageInfo& info = raster_canvas->imageInfo(); 92 const SkImageInfo& info = raster_canvas->imageInfo();
93 93 ImageHijackCanvas canvas(info.width(), info.height(), image_decode_cache_,
94 ImageHijackCanvas canvas(info.width(), info.height(), image_decode_cache_); 94 &settings.images_to_skip);
95 // Before adding the canvas, make sure that the ImageHijackCanvas is aware 95 // Before adding the canvas, make sure that the ImageHijackCanvas is aware
96 // of the current transform and clip, which may affect the clip bounds. 96 // of the current transform and clip, which may affect the clip bounds.
97 // Since we query the clip bounds of the current canvas to get the list of 97 // Since we query the clip bounds of the current canvas to get the list of
98 // draw commands to process, this is important to produce correct content. 98 // draw commands to process, this is important to produce correct content.
99 canvas.clipRect( 99 canvas.clipRect(
100 SkRect::MakeFromIRect(raster_canvas->getDeviceClipBounds())); 100 SkRect::MakeFromIRect(raster_canvas->getDeviceClipBounds()));
101 canvas.setMatrix(raster_canvas->getTotalMatrix()); 101 canvas.setMatrix(raster_canvas->getTotalMatrix());
102 canvas.addCanvas(raster_canvas); 102 canvas.addCanvas(raster_canvas);
103 103
104 RasterCommon(&canvas, nullptr); 104 RasterCommon(&canvas, nullptr);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 scoped_refptr<RasterSource> RasterSource::CreateCloneWithoutLCDText() const { 305 scoped_refptr<RasterSource> RasterSource::CreateCloneWithoutLCDText() const {
306 bool can_use_lcd_text = false; 306 bool can_use_lcd_text = false;
307 return scoped_refptr<RasterSource>(new RasterSource(this, can_use_lcd_text)); 307 return scoped_refptr<RasterSource>(new RasterSource(this, can_use_lcd_text));
308 } 308 }
309 309
310 RasterSource::PlaybackSettings::PlaybackSettings() 310 RasterSource::PlaybackSettings::PlaybackSettings()
311 : playback_to_shared_canvas(false), 311 : playback_to_shared_canvas(false),
312 skip_images(false), 312 skip_images(false),
313 use_image_hijack_canvas(true) {} 313 use_image_hijack_canvas(true) {}
314 314
315 RasterSource::PlaybackSettings::PlaybackSettings(const PlaybackSettings&) =
316 default;
317
318 RasterSource::PlaybackSettings::PlaybackSettings(PlaybackSettings&&) = default;
319
320 RasterSource::PlaybackSettings::~PlaybackSettings() = default;
321
315 } // namespace cc 322 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/raster_source.h ('k') | cc/test/fake_layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698