Index: third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.h |
diff --git a/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.h b/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.h |
index e423490f14e67e3027cbb1ed728176d82528de23..96a45895f6d89ecd2d483b1498bd7f6d7e5ceb83 100644 |
--- a/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.h |
+++ b/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.h |
@@ -6,8 +6,6 @@ |
#define AcceleratedStaticBitmapImage_h |
#include "base/threading/thread_checker.h" |
-#include "gpu/command_buffer/common/mailbox.h" |
-#include "gpu/command_buffer/common/sync_token.h" |
#include "platform/geometry/IntSize.h" |
#include "platform/graphics/StaticBitmapImage.h" |
#include "third_party/skia/include/core/SkRefCnt.h" |
@@ -29,7 +27,7 @@ public: |
static PassRefPtr<AcceleratedStaticBitmapImage> createFromSharedContextImage(sk_sp<SkImage>); |
// Can specify the GrContext that created the texture backing the for the given SkImage. Ideally all callers would use this option. |
// The |mailbox| is a name for the texture backing the SkImage, allowing other contexts to use the same backing. |
- static PassRefPtr<AcceleratedStaticBitmapImage> createFromWebGLContextImage(sk_sp<SkImage>, const gpu::Mailbox&, const gpu::SyncToken&); |
+ static PassRefPtr<AcceleratedStaticBitmapImage> createFromWebGLContextImage(sk_sp<SkImage>, const gpu::Mailbox&, const gpu::SyncToken&, GLuint); |
~AcceleratedStaticBitmapImage() override; |
@@ -43,9 +41,13 @@ public: |
// To be called on sender thread before performing a transfer |
void transfer() final; |
+ gpu::Mailbox getMailbox() final { return m_mailbox; } |
+ gpu::SyncToken getSyncToken() final { return m_syncToken; } |
+ unsigned getTextureId() final { return m_textureId; } |
+ |
private: |
AcceleratedStaticBitmapImage(sk_sp<SkImage>); |
- AcceleratedStaticBitmapImage(sk_sp<SkImage>, const gpu::Mailbox&, const gpu::SyncToken&); |
+ AcceleratedStaticBitmapImage(sk_sp<SkImage>, const gpu::Mailbox&, const gpu::SyncToken&, GLuint); |
void ensureMailbox(); |
void createImageFromMailboxIfNeeded(); |
@@ -69,6 +71,9 @@ private: |
base::ThreadChecker m_threadChecker; |
bool m_detachThreadAtNextCheck = false; |
+ |
+ // keep textureId which is required when preparing cc::TransferableResource |
+ unsigned m_textureId = 0; |
Justin Novosad
2016/09/09 19:10:50
Do we really need this? This texture Id is not us
xidachen
2016/09/09 19:23:42
But don't we need something like:
gl->DeleteTextur
|
}; |
} // namespace blink |