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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 const int8_t* name() const { return mailbox().name; } | 51 const int8_t* name() const { return mailbox().name; } |
52 uint32_t target() const { return mailbox_holder_.texture_target; } | 52 uint32_t target() const { return mailbox_holder_.texture_target; } |
53 const gpu::SyncToken& sync_token() const { | 53 const gpu::SyncToken& sync_token() const { |
54 return mailbox_holder_.sync_token; | 54 return mailbox_holder_.sync_token; |
55 } | 55 } |
56 void set_sync_token(const gpu::SyncToken& sync_token) { | 56 void set_sync_token(const gpu::SyncToken& sync_token) { |
57 mailbox_holder_.sync_token = sync_token; | 57 mailbox_holder_.sync_token = sync_token; |
58 } | 58 } |
59 | 59 |
60 bool is_overlay_candidate() const { return is_overlay_candidate_; } | 60 bool is_overlay_candidate() const { return is_overlay_candidate_; } |
| 61 void set_is_overlay_candidate(bool overlay_candidate) { |
| 62 is_overlay_candidate_ = overlay_candidate; |
| 63 } |
61 bool secure_output_only() const { return secure_output_only_; } | 64 bool secure_output_only() const { return secure_output_only_; } |
62 bool nearest_neighbor() const { return nearest_neighbor_; } | 65 bool nearest_neighbor() const { return nearest_neighbor_; } |
63 void set_nearest_neighbor(bool nearest_neighbor) { | 66 void set_nearest_neighbor(bool nearest_neighbor) { |
64 nearest_neighbor_ = nearest_neighbor; | 67 nearest_neighbor_ = nearest_neighbor; |
65 } | 68 } |
66 const gfx::ColorSpace& color_space() const { return color_space_; } | 69 const gfx::ColorSpace& color_space() const { return color_space_; } |
67 void set_color_space(const gfx::ColorSpace& color_space) { | 70 void set_color_space(const gfx::ColorSpace& color_space) { |
68 color_space_ = color_space; | 71 color_space_ = color_space; |
69 } | 72 } |
70 | 73 |
71 // This is valid if allow_overlau() or IsSharedMemory() is true. | 74 // This is valid if allow_overlau() or IsSharedMemory() is true. |
72 gfx::Size size_in_pixels() const { return size_in_pixels_; } | 75 gfx::Size size_in_pixels() const { return size_in_pixels_; } |
73 | 76 |
74 SharedBitmap* shared_bitmap() const { return shared_bitmap_; } | 77 SharedBitmap* shared_bitmap() const { return shared_bitmap_; } |
75 size_t SharedMemorySizeInBytes() const; | 78 size_t SharedMemorySizeInBytes() const; |
76 | 79 |
| 80 #if defined(OS_ANDROID) |
| 81 bool is_backed_by_surface_texture() const { |
| 82 return is_backed_by_surface_texture_; |
| 83 } |
| 84 |
| 85 void set_is_backed_by_surface_texture(bool value) { |
| 86 is_backed_by_surface_texture_ = value; |
| 87 } |
| 88 |
| 89 bool wants_promotion_hint() const { return wants_promotion_hint_; } |
| 90 |
| 91 void set_wants_promotion_hint(bool value) { wants_promotion_hint_ = value; } |
| 92 #endif |
| 93 |
77 private: | 94 private: |
78 gpu::MailboxHolder mailbox_holder_; | 95 gpu::MailboxHolder mailbox_holder_; |
79 SharedBitmap* shared_bitmap_; | 96 SharedBitmap* shared_bitmap_; |
80 gfx::Size size_in_pixels_; | 97 gfx::Size size_in_pixels_; |
81 bool is_overlay_candidate_; | 98 bool is_overlay_candidate_; |
| 99 #if defined(OS_ANDROID) |
| 100 bool is_backed_by_surface_texture_; |
| 101 bool wants_promotion_hint_; |
| 102 #endif |
82 bool secure_output_only_; | 103 bool secure_output_only_; |
83 bool nearest_neighbor_; | 104 bool nearest_neighbor_; |
84 gfx::ColorSpace color_space_; | 105 gfx::ColorSpace color_space_; |
85 }; | 106 }; |
86 | 107 |
87 } // namespace cc | 108 } // namespace cc |
88 | 109 |
89 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ | 110 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ |
OLD | NEW |