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

Unified Diff: cc/test/fake_content_layer_client.cc

Issue 1673193002: HBitmap can't be immutable Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_content_layer_client.h ('k') | cc/test/fake_display_list_recording_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_content_layer_client.cc
diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc
index 7876d2961126d055d1d05f4f1b8c87fdb688eb86..6577d04e038933b2daea97d39a5955566ab2302b 100644
--- a/cc/test/fake_content_layer_client.cc
+++ b/cc/test/fake_content_layer_client.cc
@@ -35,7 +35,8 @@ FakeContentLayerClient::FakeContentLayerClient()
last_canvas_(nullptr),
last_painting_control_(PAINTING_BEHAVIOR_NORMAL),
reported_memory_usage_(0),
- bounds_set_(false) {}
+ bounds_set_(false),
+ delegate_(nullptr) {}
FakeContentLayerClient::~FakeContentLayerClient() {
}
@@ -102,6 +103,14 @@ FakeContentLayerClient::PaintContentsToDisplayList(
}
}
+ if (delegate_) {
+ canvas =
+ skia::SharePtr(recorder.beginRecording(
+ gfx::RectToSkRect(PaintableRegion())));
+ delegate_->OnPaint(canvas.get(), PaintableRegion());
+ display_list->CreateAndAppendItem<DrawingDisplayItem>(
+ PaintableRegion(), skia::AdoptRef(recorder.endRecordingAsPicture()));
+ }
display_list->Finalize();
return display_list;
« no previous file with comments | « cc/test/fake_content_layer_client.h ('k') | cc/test/fake_display_list_recording_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698