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

Side by Side Diff: cc/test/fake_raster_source.cc

Issue 2075873002: Support general raster matrix for RasterSource and DisplayItemList (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix a bug in PrepareForPlaybackToCanvas and fix cc_unittests Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/test/fake_raster_source.h" 5 #include "cc/test/fake_raster_source.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "cc/test/fake_recording_source.h" 10 #include "cc/test/fake_recording_source.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 FakeRasterSource::FakeRasterSource(const RecordingSource* recording_source, 133 FakeRasterSource::FakeRasterSource(const RecordingSource* recording_source,
134 bool can_use_lcd, 134 bool can_use_lcd,
135 base::WaitableEvent* playback_allowed_event) 135 base::WaitableEvent* playback_allowed_event)
136 : RasterSource(recording_source, can_use_lcd), 136 : RasterSource(recording_source, can_use_lcd),
137 playback_allowed_event_(playback_allowed_event) {} 137 playback_allowed_event_(playback_allowed_event) {}
138 138
139 FakeRasterSource::~FakeRasterSource() {} 139 FakeRasterSource::~FakeRasterSource() {}
140 140
141 void FakeRasterSource::PlaybackToCanvas( 141 void FakeRasterSource::PlaybackToCanvas(
142 SkCanvas* canvas, 142 SkCanvas* canvas,
143 const gfx::Rect& canvas_bitmap_rect,
144 const gfx::Rect& canvas_playback_rect,
145 float contents_scale,
146 const PlaybackSettings& settings) const { 143 const PlaybackSettings& settings) const {
147 if (playback_allowed_event_) 144 if (playback_allowed_event_)
148 playback_allowed_event_->Wait(); 145 playback_allowed_event_->Wait();
149 RasterSource::PlaybackToCanvas(canvas, canvas_bitmap_rect, 146 RasterSource::PlaybackToCanvas(canvas, settings);
150 canvas_playback_rect, contents_scale,
151 settings);
152 } 147 }
153 148
154 } // namespace cc 149 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698