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

Unified Diff: content/renderer/gpu/compositor_output_surface.cc

Issue 1356463002: Revert of cc: Implement shared worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « content/renderer/gpu/compositor_output_surface.h ('k') | content/renderer/gpu/mailbox_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/compositor_output_surface.cc
diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc
index 3f96ef3745a03ebe919edac859b3a63929335a52..c3298d03d5faf315b429cdcf71e96c232675985e 100644
--- a/content/renderer/gpu/compositor_output_surface.cc
+++ b/content/renderer/gpu/compositor_output_surface.cc
@@ -50,15 +50,28 @@
weak_ptrs_(this) {
DCHECK(output_surface_filter_.get());
DCHECK(frame_swap_message_queue_.get());
+ DetachFromThread();
capabilities_.max_frames_pending = 1;
message_sender_ = RenderThreadImpl::current()->sync_message_filter();
DCHECK(message_sender_.get());
}
-CompositorOutputSurface::~CompositorOutputSurface() {}
+CompositorOutputSurface::~CompositorOutputSurface() {
+ DCHECK(CalledOnValidThread());
+ if (!HasClient())
+ return;
+ UpdateSmoothnessTakesPriority(false);
+ if (output_surface_proxy_.get())
+ output_surface_proxy_->ClearOutputSurface();
+ output_surface_filter_->RemoveHandlerOnCompositorThread(
+ routing_id_,
+ output_surface_filter_handler_);
+}
bool CompositorOutputSurface::BindToClient(
cc::OutputSurfaceClient* client) {
+ DCHECK(CalledOnValidThread());
+
if (!cc::OutputSurface::BindToClient(client))
return false;
@@ -79,17 +92,6 @@
}
return true;
-}
-
-void CompositorOutputSurface::DetachFromClient() {
- if (!HasClient())
- return;
- UpdateSmoothnessTakesPriority(false);
- if (output_surface_proxy_.get())
- output_surface_proxy_->ClearOutputSurface();
- output_surface_filter_->RemoveHandlerOnCompositorThread(
- routing_id_, output_surface_filter_handler_);
- cc::OutputSurface::DetachFromClient();
}
void CompositorOutputSurface::ShortcutSwapAck(
@@ -154,7 +156,7 @@
}
void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) {
- DCHECK(client_thread_checker_.CalledOnValidThread());
+ DCHECK(CalledOnValidThread());
if (!HasClient())
return;
IPC_BEGIN_MESSAGE_MAP(CompositorOutputSurface, message)
@@ -168,7 +170,7 @@
void CompositorOutputSurface::OnUpdateVSyncParametersFromBrowser(
base::TimeTicks timebase,
base::TimeDelta interval) {
- DCHECK(client_thread_checker_.CalledOnValidThread());
+ DCHECK(CalledOnValidThread());
CommitVSyncParameters(timebase, interval);
}
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.h ('k') | content/renderer/gpu/mailbox_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698