Index: cc/resources/texture_mailbox.h |
diff --git a/cc/resources/texture_mailbox.h b/cc/resources/texture_mailbox.h |
index 855287df2d1931102322025818b0bd2adb93099c..2608295606f0ebc737584677e4ff597336c82f13 100644 |
--- a/cc/resources/texture_mailbox.h |
+++ b/cc/resources/texture_mailbox.h |
@@ -11,6 +11,7 @@ |
#include "base/memory/shared_memory.h" |
#include "cc/base/cc_export.h" |
#include "gpu/command_buffer/common/mailbox.h" |
+#include "third_party/skia/include/core/SkBitmap.h" |
#include "ui/gfx/size.h" |
namespace cc { |
@@ -36,12 +37,16 @@ class CC_EXPORT TextureMailbox { |
TextureMailbox(base::SharedMemory* shared_memory, |
gfx::Size size, |
const ReleaseCallback& callback); |
+ TextureMailbox(SkBitmap bitmap, |
+ gfx::Size size, |
+ const ReleaseCallback& callback); |
~TextureMailbox(); |
- bool IsValid() const { return IsTexture() || IsSharedMemory(); } |
+ bool IsValid() const { return IsTexture() || IsSharedMemory() || IsBitmap(); } |
bool IsTexture() const { return !name_.IsZero(); } |
bool IsSharedMemory() const { return shared_memory_ != NULL; } |
+ bool IsBitmap() const { return !bitmap_.isNull(); } |
bool Equals(const TextureMailbox&) const; |
bool ContainsMailbox(const gpu::Mailbox&) const; |
@@ -59,6 +64,7 @@ class CC_EXPORT TextureMailbox { |
base::SharedMemory* shared_memory() const { return shared_memory_; } |
gfx::Size shared_memory_size() const { return shared_memory_size_; } |
size_t shared_memory_size_in_bytes() const; |
+ const SkBitmap& bitmap() const { return bitmap_; } |
TextureMailbox CopyWithNewCallback(const ReleaseCallback& callback) const; |
@@ -69,6 +75,7 @@ class CC_EXPORT TextureMailbox { |
unsigned sync_point_; |
base::SharedMemory* shared_memory_; |
gfx::Size shared_memory_size_; |
+ SkBitmap bitmap_; |
}; |
} // namespace cc |