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

Unified Diff: third_party/WebKit/Source/platform/graphics/TextureHolder.h

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: +DISALLOW_COPY_AND_ASSIGN for win build fix Created 3 years, 11 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
Index: third_party/WebKit/Source/platform/graphics/TextureHolder.h
diff --git a/third_party/WebKit/Source/platform/graphics/TextureHolder.h b/third_party/WebKit/Source/platform/graphics/TextureHolder.h
index 19618ebb658d008760510d0aa318476f2c989f14..36eeed6704f6e3cb7dfbdedb9ec245a72a25c95e 100644
--- a/third_party/WebKit/Source/platform/graphics/TextureHolder.h
+++ b/third_party/WebKit/Source/platform/graphics/TextureHolder.h
@@ -45,17 +45,15 @@ class PLATFORM_EXPORT TextureHolder {
}
virtual void setSharedContextId(unsigned) { NOTREACHED(); }
virtual void setImageThread(WebThread*) { NOTREACHED(); }
- virtual void setImageThreadTaskRunner(std::unique_ptr<WebTaskRunner>) {
- NOTREACHED();
- }
+ virtual void setImageThreadTaskRunner(RefPtr<WebTaskRunner>) { NOTREACHED(); }
// Methods that have exactly the same impelmentation for all sub-classes
bool wasTransferred() { return m_wasTransferred; }
- WebTaskRunner* textureThreadTaskRunner() {
- return m_textureThreadTaskRunner.get();
+ RefPtr<WebTaskRunner> textureThreadTaskRunner() {
+ return m_textureThreadTaskRunner;
}
void setWasTransferred(bool flag) { m_wasTransferred = flag; }
- void setTextureThreadTaskRunner(std::unique_ptr<WebTaskRunner> taskRunner) {
+ void setTextureThreadTaskRunner(RefPtr<WebTaskRunner> taskRunner) {
m_textureThreadTaskRunner = std::move(taskRunner);
}
@@ -69,7 +67,7 @@ class PLATFORM_EXPORT TextureHolder {
// another thread, and the original thread gone out of scope, and that we need
// to clear the resouces associated with that AcceleratedStaticBitmapImage on
// the original thread.
- std::unique_ptr<WebTaskRunner> m_textureThreadTaskRunner;
+ RefPtr<WebTaskRunner> m_textureThreadTaskRunner;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698