| Index: cc/test/fake_recording_source.h
|
| diff --git a/cc/test/fake_recording_source.h b/cc/test/fake_recording_source.h
|
| index 159a3fb874317726e261cb95794454cb7babd0ce..066a8583f36b3c427cc6447f15c3d2d847feed6d 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,7 +40,6 @@ 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;
|
| }
|
| @@ -50,16 +47,11 @@ class FakeRecordingSource : public RecordingSource {
|
| // RecordingSource overrides.
|
| scoped_refptr<RasterSource> CreateRasterSource(
|
| bool can_use_lcd) const override;
|
| - bool IsSuitableForGpuRasterization() 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 +61,18 @@ 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 new_recorded_viewport = client_.PaintableRegion();
|
| + scoped_refptr<DisplayItemList> display_list =
|
| + client_.PaintContentsToDisplayList(
|
| + ContentLayerClient::PAINTING_BEHAVIOR_NORMAL);
|
| + size_t painter_reported_memory_usage =
|
| + client_.GetApproximateUnsharedMemoryUsage();
|
| + UpdateAndExpandInvalidation(&client_, &invalidation, size_,
|
| + new_recorded_viewport, display_list,
|
| + painter_reported_memory_usage);
|
| }
|
|
|
| void add_draw_rect(const gfx::Rect& rect) {
|
| @@ -127,8 +126,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|.
|
|
|