| 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 #ifndef CC_RESOURCES_TEXTURE_MAILBOX_H_ | 5 #ifndef CC_RESOURCES_TEXTURE_MAILBOX_H_ |
| 6 #define CC_RESOURCES_TEXTURE_MAILBOX_H_ | 6 #define CC_RESOURCES_TEXTURE_MAILBOX_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 const gpu::Mailbox& mailbox() const { return mailbox_holder_.mailbox; } | 34 const gpu::Mailbox& mailbox() const { return mailbox_holder_.mailbox; } |
| 35 const int8* name() const { return mailbox().name; } | 35 const int8* name() const { return mailbox().name; } |
| 36 uint32 target() const { return mailbox_holder_.texture_target; } | 36 uint32 target() const { return mailbox_holder_.texture_target; } |
| 37 uint32 sync_point() const { return mailbox_holder_.sync_point; } | 37 uint32 sync_point() const { return mailbox_holder_.sync_point; } |
| 38 void set_sync_point(int32 sync_point) { | 38 void set_sync_point(int32 sync_point) { |
| 39 mailbox_holder_.sync_point = sync_point; | 39 mailbox_holder_.sync_point = sync_point; |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool allow_overlay() const { return allow_overlay_; } | 42 bool allow_overlay() const { return allow_overlay_; } |
| 43 void set_allow_overlay(bool allow_overlay) { allow_overlay_ = allow_overlay; } | 43 void set_allow_overlay(bool allow_overlay) { allow_overlay_ = allow_overlay; } |
| 44 bool nearest_neighbor() const { return nearest_neighbor_; } |
| 45 void set_nearest_neighbor(bool nearest_neighbor) { |
| 46 nearest_neighbor_ = nearest_neighbor; |
| 47 } |
| 44 | 48 |
| 45 base::SharedMemory* shared_memory() const { return shared_memory_; } | 49 base::SharedMemory* shared_memory() const { return shared_memory_; } |
| 46 gfx::Size shared_memory_size() const { return shared_memory_size_; } | 50 gfx::Size shared_memory_size() const { return shared_memory_size_; } |
| 47 size_t SharedMemorySizeInBytes() const; | 51 size_t SharedMemorySizeInBytes() const; |
| 48 | 52 |
| 49 private: | 53 private: |
| 50 gpu::MailboxHolder mailbox_holder_; | 54 gpu::MailboxHolder mailbox_holder_; |
| 51 base::SharedMemory* shared_memory_; | 55 base::SharedMemory* shared_memory_; |
| 52 gfx::Size shared_memory_size_; | 56 gfx::Size shared_memory_size_; |
| 53 bool allow_overlay_; | 57 bool allow_overlay_; |
| 58 bool nearest_neighbor_; |
| 54 }; | 59 }; |
| 55 | 60 |
| 56 } // namespace cc | 61 } // namespace cc |
| 57 | 62 |
| 58 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ | 63 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ |
| OLD | NEW |