| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 void set_color_space(const gfx::ColorSpace& color_space) { | 67 void set_color_space(const gfx::ColorSpace& color_space) { |
| 68 color_space_ = color_space; | 68 color_space_ = color_space; |
| 69 } | 69 } |
| 70 | 70 |
| 71 // This is valid if allow_overlau() or IsSharedMemory() is true. | 71 // This is valid if allow_overlau() or IsSharedMemory() is true. |
| 72 gfx::Size size_in_pixels() const { return size_in_pixels_; } | 72 gfx::Size size_in_pixels() const { return size_in_pixels_; } |
| 73 | 73 |
| 74 SharedBitmap* shared_bitmap() const { return shared_bitmap_; } | 74 SharedBitmap* shared_bitmap() const { return shared_bitmap_; } |
| 75 size_t SharedMemorySizeInBytes() const; | 75 size_t SharedMemorySizeInBytes() const; |
| 76 | 76 |
| 77 #if defined(OS_ANDROID) |
| 78 bool is_backed_by_surface_texture() const { |
| 79 return is_backed_by_surface_texture_; |
| 80 } |
| 81 |
| 82 void set_is_backed_by_surface_texture(bool value) { |
| 83 is_backed_by_surface_texture_ = value; |
| 84 } |
| 85 |
| 86 bool wants_promotion_hint() const { return wants_promotion_hint_; } |
| 87 |
| 88 void set_wants_promotion_hint(bool value) { wants_promotion_hint_ = value; } |
| 89 #endif |
| 90 |
| 77 private: | 91 private: |
| 78 gpu::MailboxHolder mailbox_holder_; | 92 gpu::MailboxHolder mailbox_holder_; |
| 79 SharedBitmap* shared_bitmap_; | 93 SharedBitmap* shared_bitmap_; |
| 80 gfx::Size size_in_pixels_; | 94 gfx::Size size_in_pixels_; |
| 81 bool is_overlay_candidate_; | 95 bool is_overlay_candidate_; |
| 96 #if defined(OS_ANDROID) |
| 97 bool is_backed_by_surface_texture_; |
| 98 bool wants_promotion_hint_; |
| 99 #endif |
| 82 bool secure_output_only_; | 100 bool secure_output_only_; |
| 83 bool nearest_neighbor_; | 101 bool nearest_neighbor_; |
| 84 gfx::ColorSpace color_space_; | 102 gfx::ColorSpace color_space_; |
| 85 }; | 103 }; |
| 86 | 104 |
| 87 } // namespace cc | 105 } // namespace cc |
| 88 | 106 |
| 89 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ | 107 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ |
| OLD | NEW |