| Index: cc/test/fake_recording_source.h
|
| diff --git a/cc/test/fake_recording_source.h b/cc/test/fake_recording_source.h
|
| index 20f9538dad5dc5b85c824373aa77a401d940ac6e..87badd2e0e3d87f56a60cf19e0a90fba24b0713d 100644
|
| --- a/cc/test/fake_recording_source.h
|
| +++ b/cc/test/fake_recording_source.h
|
| @@ -29,11 +29,9 @@ class FakeRecordingSource : public RecordingSource {
|
| ~FakeRecordingSource() override {}
|
|
|
| static std::unique_ptr<FakeRecordingSource> CreateRecordingSource(
|
| - const gfx::Rect& recorded_viewport,
|
| const gfx::Size& layer_bounds) {
|
| std::unique_ptr<FakeRecordingSource> recording_source(
|
| new FakeRecordingSource);
|
| - recording_source->SetRecordedViewport(recorded_viewport);
|
| recording_source->SetLayerBounds(layer_bounds);
|
| return recording_source;
|
| }
|
| @@ -42,24 +40,21 @@ class FakeRecordingSource : public RecordingSource {
|
| const gfx::Size& layer_bounds) {
|
| std::unique_ptr<FakeRecordingSource> recording_source(
|
| new FakeRecordingSource);
|
| - recording_source->SetRecordedViewport(gfx::Rect(layer_bounds));
|
| recording_source->SetLayerBounds(layer_bounds);
|
| return recording_source;
|
| }
|
|
|
| // RecordingSource overrides.
|
| scoped_refptr<RasterSource> CreateRasterSource(
|
| - bool can_use_lcd) const override;
|
| - bool IsSuitableForGpuRasterization() const override;
|
| + bool can_use_lcd,
|
| + gfx::Rect& recorded_viewport,
|
| + scoped_refptr<DisplayItemList>& display_list,
|
| + size_t& painter_reported_memory_usage) const override;
|
|
|
| void SetDisplayListUsesCachedPicture(bool use_cached_picture) {
|
| client_.set_display_list_use_cached_picture(use_cached_picture);
|
| }
|
|
|
| - void SetRecordedViewport(const gfx::Rect& recorded_viewport) {
|
| - recorded_viewport_ = recorded_viewport;
|
| - }
|
| -
|
| void SetLayerBounds(const gfx::Size& layer_bounds) {
|
| size_ = layer_bounds;
|
| client_.set_bounds(layer_bounds);
|
| @@ -69,11 +64,17 @@ class FakeRecordingSource : public RecordingSource {
|
| clear_canvas_with_debug_color_ = clear;
|
| }
|
|
|
| - void Rerecord() {
|
| - SetNeedsDisplayRect(recorded_viewport_);
|
| + void Rerecord(const gfx::Rect& recorded_viewport) {
|
| + SetNeedsDisplayRect(recorded_viewport);
|
| Region invalidation;
|
| - UpdateAndExpandInvalidation(&client_, &invalidation, size_, 0,
|
| - RECORD_NORMALLY);
|
| + gfx::Rect old_recorded_viewport = recorded_viewport;
|
| + gfx::Rect new_recorded_viewport = client_.PaintableRegion();
|
| + scoped_refptr<DisplayItemList> display_list =
|
| + client_.PaintContentsToDisplayList(
|
| + ContentLayerClient::PAINTING_BEHAVIOR_NORMAL);
|
| + UpdateAndExpandInvalidation(&client_, &invalidation, size_,
|
| + old_recorded_viewport, new_recorded_viewport,
|
| + display_list);
|
| }
|
|
|
| void add_draw_rect(const gfx::Rect& rect) {
|
| @@ -127,8 +128,6 @@ class FakeRecordingSource : public RecordingSource {
|
| playback_allowed_event_ = event;
|
| }
|
|
|
| - DisplayItemList* display_list() const { return display_list_.get(); }
|
| -
|
| // Checks that the basic properties of the |other| match |this|. For the
|
| // DisplayItemList, it checks that the painted result matches the painted
|
| // result of |other|.
|
|
|