| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/resources/texture_mailbox.h" | 5 #include "cc/resources/texture_mailbox.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "cc/resources/shared_bitmap.h" | 8 #include "cc/resources/shared_bitmap.h" |
| 9 #include "third_party/khronos/GLES2/gl2.h" | |
| 10 | 9 |
| 11 namespace cc { | 10 namespace cc { |
| 12 | 11 |
| 13 TextureMailbox::TextureMailbox() : shared_memory_(NULL) {} | 12 TextureMailbox::TextureMailbox() : shared_memory_(NULL) {} |
| 14 | 13 |
| 15 TextureMailbox::TextureMailbox(const gpu::MailboxHolder& mailbox_holder) | 14 TextureMailbox::TextureMailbox(const gpu::MailboxHolder& mailbox_holder) |
| 16 : mailbox_holder_(mailbox_holder), | 15 : mailbox_holder_(mailbox_holder), |
| 17 shared_memory_(NULL), | 16 shared_memory_(NULL), |
| 18 allow_overlay_(false) {} | 17 allow_overlay_(false) {} |
| 19 | 18 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 50 return !IsValid(); | 49 return !IsValid(); |
| 51 } | 50 } |
| 52 | 51 |
| 53 size_t TextureMailbox::SharedMemorySizeInBytes() const { | 52 size_t TextureMailbox::SharedMemorySizeInBytes() const { |
| 54 // UncheckedSizeInBytes is okay because we VerifySizeInBytes in the | 53 // UncheckedSizeInBytes is okay because we VerifySizeInBytes in the |
| 55 // constructor and the field is immutable. | 54 // constructor and the field is immutable. |
| 56 return SharedBitmap::UncheckedSizeInBytes(shared_memory_size_); | 55 return SharedBitmap::UncheckedSizeInBytes(shared_memory_size_); |
| 57 } | 56 } |
| 58 | 57 |
| 59 } // namespace cc | 58 } // namespace cc |
| OLD | NEW |