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

Unified Diff: blimp/client/support/compositor/blimp_embedder_compositor.cc

Issue 2443003004: cc: Make OutputSurface::BindToClient pure virtual and not return bool (Closed)
Patch Set: bindtoclient-pure-virtual: rebase Created 4 years, 2 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 | « android_webview/browser/surfaces_instance.cc ('k') | cc/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/support/compositor/blimp_embedder_compositor.cc
diff --git a/blimp/client/support/compositor/blimp_embedder_compositor.cc b/blimp/client/support/compositor/blimp_embedder_compositor.cc
index f8116dced4d77d54370a5aa925b4dfe935741825..c4fe2f6db35ba3e5d52c1ced79489d9a845ad832 100644
--- a/blimp/client/support/compositor/blimp_embedder_compositor.cc
+++ b/blimp/client/support/compositor/blimp_embedder_compositor.cc
@@ -51,6 +51,10 @@ class DisplayOutputSurface : public cc::OutputSurface {
~DisplayOutputSurface() override = default;
// cc::OutputSurface implementation
+ void BindToClient(cc::OutputSurfaceClient* client) override {
+ client_ = client;
+ }
+
void EnsureBackbuffer() override {}
void DiscardBackbuffer() override {
context_provider()->ContextGL()->DiscardBackbufferCHROMIUM();
@@ -90,6 +94,7 @@ class DisplayOutputSurface : public cc::OutputSurface {
private:
void SwapBuffersCallback() { client_->DidReceiveSwapBuffersAck(); }
+ cc::OutputSurfaceClient* client_ = nullptr;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
base::WeakPtrFactory<DisplayOutputSurface> weak_ptr_factory_;
@@ -194,6 +199,7 @@ void BlimpEmbedderCompositor::HandlePendingCompositorFrameSinkRequest() {
return;
DCHECK(context_provider_);
+ context_provider_->BindToCurrentThread();
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager =
compositor_dependencies_->GetGpuMemoryBufferManager();
« no previous file with comments | « android_webview/browser/surfaces_instance.cc ('k') | cc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698