Index: cc/resources/texture_mailbox.cc |
diff --git a/cc/resources/texture_mailbox.cc b/cc/resources/texture_mailbox.cc |
index 0d4787438f46b2d5a00488d74087cc42952c79f1..273f55ebc8141cb9c114d64a9acddf790723999d 100644 |
--- a/cc/resources/texture_mailbox.cc |
+++ b/cc/resources/texture_mailbox.cc |
@@ -76,6 +76,17 @@ TextureMailbox::TextureMailbox( |
shared_memory_size_(size) { |
} |
+TextureMailbox::TextureMailbox( |
+ SkBitmap bitmap, |
+ gfx::Size size, |
+ const ReleaseCallback& callback) |
+ : callback_(callback), |
+ target_(GL_TEXTURE_2D), |
+ sync_point_(0), |
+ bitmap_(bitmap), |
+ shared_memory_size_(size) { |
+} |
+ |
TextureMailbox::~TextureMailbox() { |
} |
@@ -84,6 +95,8 @@ bool TextureMailbox::Equals(const TextureMailbox& other) const { |
return ContainsMailbox(other.name()); |
else if (other.IsSharedMemory()) |
return ContainsHandle(other.shared_memory_->handle()); |
+ else if (other.IsBitmap()) |
+ return other.bitmap_.getPixels() == bitmap_.getPixels(); |
DCHECK(!other.IsValid()); |
return !IsValid(); |