#include "base/callback.h"
#include "base/synchronization/lock.h"
+#include "base/threading/thread_checker.h"
#include "cc/base/cc_export.h"
#include "cc/layers/layer.h"
#include "cc/resources/texture_mailbox.h"
namespace cc {
class BlockingTaskRunner;
class SingleReleaseCallback;
+class SingleReleaseCallbackImpl;
class TextureLayerClient;
// A Layer containing a the rendered output of a plugin instance.
// Gets a ReleaseCallback that can be called from another thread. Note: the
// caller must ensure the callback is called.
- scoped_ptr<SingleReleaseCallback> GetCallbackForImplThread();
+ scoped_ptr<SingleReleaseCallbackImpl> GetCallbackForImplThread();
protected:
friend class TextureLayer;
void InternalAddRef();
void InternalRelease();
- void ReturnAndReleaseOnImplThread(uint32 sync_point, bool is_lost);
-
- // This member is thread safe, and is accessed on main and impl threads.
- const scoped_refptr<BlockingTaskRunner> message_loop_;
+ void ReturnAndReleaseOnImplThread(
+ uint32 sync_point,
+ bool is_lost,
+ BlockingTaskRunner* main_thread_task_runner);
// These members are only accessed on the main thread, or on the impl thread
// during commit where the main thread is blocked.
base::Lock arguments_lock_;
uint32 sync_point_;
bool is_lost_;
+ base::ThreadChecker main_thread_checker_;
DISALLOW_COPY_AND_ASSIGN(TextureMailboxHolder);
};
virtual bool Update(ResourceUpdateQueue* queue,
const OcclusionTracker<Layer>* occlusion) OVERRIDE;
virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
- virtual Region VisibleContentOpaqueRegion() const OVERRIDE;
+ virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const OVERRIDE;
protected:
explicit TextureLayer(TextureLayerClient* client);