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

Unified Diff: cc/output/output_surface.h

Issue 1336733002: Re-land: cc: Implement shared worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix LayerTreeHostClientTakeAwayOutputSurface test. Content provider is always destroyed on the clie… 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 | « cc/output/context_provider.h ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.h
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index f2cace6ce708fd37d1c597f7306bc14beace9b2a..0b7c1947b06dfb82d63966aa4a76900203e48259 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -11,6 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/threading/thread_checker.h"
#include "cc/base/cc_export.h"
#include "cc/output/context_provider.h"
#include "cc/output/overlay_candidate_validator.h"
@@ -112,10 +113,14 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
// Called by the compositor on the compositor thread. This is a place where
// thread-specific data for the output surface can be initialized, since from
- // this point on the output surface will only be used on the compositor
- // thread.
+ // this point to when DetachFromClient() is called the output surface will
+ // only be used on the compositor thread.
virtual bool BindToClient(OutputSurfaceClient* client);
+ // Called by the compositor on the compositor thread. This is a place where
+ // thread-specific data for the output surface can be uninitialized.
+ virtual void DetachFromClient();
+
virtual void EnsureBackbuffer();
virtual void DiscardBackbuffer();
@@ -180,6 +185,7 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
scoped_ptr<SoftwareOutputDevice> software_device_;
gfx::Size surface_size_;
float device_scale_factor_;
+ base::ThreadChecker client_thread_checker_;
void CommitVSyncParameters(base::TimeTicks timebase,
base::TimeDelta interval);
« no previous file with comments | « cc/output/context_provider.h ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698