Chromium Code Reviews| Index: cc/resources/texture_mailbox.cc |
| diff --git a/cc/resources/texture_mailbox.cc b/cc/resources/texture_mailbox.cc |
| index 9bf242e1d7c897e44b4c0f904d0ec54b29cf87cc..e043a734db4419ccf2ed8776ff0d7ade15260134 100644 |
| --- a/cc/resources/texture_mailbox.cc |
| +++ b/cc/resources/texture_mailbox.cc |
| @@ -28,15 +28,27 @@ TextureMailbox::TextureMailbox(const gpu::Mailbox& mailbox, |
| nearest_neighbor_(false) { |
| } |
| +TextureMailbox::TextureMailbox(const gpu::Mailbox& mailbox, |
| + uint32 target, |
| + uint32 sync_point, |
| + const gfx::Size& size, |
| + bool allow_overlay) |
| + : mailbox_holder_(mailbox, target, sync_point), |
| + shared_bitmap_(NULL), |
|
danakj
2015/05/29 20:04:15
nullptr
achaulk
2015/06/01 15:43:10
Done.
|
| + size_(size), |
| + allow_overlay_(allow_overlay), |
| + nearest_neighbor_(false) { |
| +} |
|
danakj
2015/05/29 20:04:15
can you DCHECK_IMPLIES(allow_overlay, !size.IsEmpt
achaulk
2015/06/01 15:43:10
Done.
|
| + |
| TextureMailbox::TextureMailbox(SharedBitmap* shared_bitmap, |
| const gfx::Size& size) |
| : shared_bitmap_(shared_bitmap), |
| - shared_memory_size_(size), |
| + size_(size), |
| allow_overlay_(false), |
| nearest_neighbor_(false) { |
| // If an embedder of cc gives an invalid TextureMailbox, we should crash |
| // here to identify the offender. |
| - CHECK(SharedBitmap::VerifySizeInBytes(shared_memory_size_)); |
| + CHECK(SharedBitmap::VerifySizeInBytes(size_)); |
| } |
| TextureMailbox::~TextureMailbox() {} |
| @@ -57,7 +69,7 @@ bool TextureMailbox::Equals(const TextureMailbox& other) const { |
| size_t TextureMailbox::SharedMemorySizeInBytes() const { |
| // UncheckedSizeInBytes is okay because we VerifySizeInBytes in the |
| // constructor and the field is immutable. |
| - return SharedBitmap::UncheckedSizeInBytes(shared_memory_size_); |
| + return SharedBitmap::UncheckedSizeInBytes(size_); |
| } |
| } // namespace cc |