OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_LAYERS_TEXTURE_LAYER_H_ | 5 #ifndef CC_LAYERS_TEXTURE_LAYER_H_ |
6 #define CC_LAYERS_TEXTURE_LAYER_H_ | 6 #define CC_LAYERS_TEXTURE_LAYER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // opacity value. | 50 // opacity value. |
51 void SetVertexOpacity(float bottom_left, | 51 void SetVertexOpacity(float bottom_left, |
52 float top_left, | 52 float top_left, |
53 float top_right, | 53 float top_right, |
54 float bottom_right); | 54 float bottom_right); |
55 | 55 |
56 // Sets whether the alpha channel is premultiplied or unpremultiplied. | 56 // Sets whether the alpha channel is premultiplied or unpremultiplied. |
57 // Defaults to true. | 57 // Defaults to true. |
58 void SetPremultipliedAlpha(bool premultiplied_alpha); | 58 void SetPremultipliedAlpha(bool premultiplied_alpha); |
59 | 59 |
| 60 // Sets whether the texture should be blended with the background color |
| 61 // at draw time. Defaults to false. |
| 62 void SetBlendBackgroundColor(bool blend); |
| 63 |
60 // Sets whether this context should rate limit on damage to prevent too many | 64 // Sets whether this context should rate limit on damage to prevent too many |
61 // frames from being queued up before the compositor gets a chance to run. | 65 // frames from being queued up before the compositor gets a chance to run. |
62 // Requires a non-nil client. Defaults to false. | 66 // Requires a non-nil client. Defaults to false. |
63 void SetRateLimitContext(bool rate_limit); | 67 void SetRateLimitContext(bool rate_limit); |
64 | 68 |
65 // Code path for plugins which supply their own texture ID. | 69 // Code path for plugins which supply their own texture ID. |
66 void SetTextureId(unsigned texture_id); | 70 void SetTextureId(unsigned texture_id); |
67 | 71 |
68 // Code path for plugins which supply their own mailbox. | 72 // Code path for plugins which supply their own mailbox. |
69 bool uses_mailbox() const { return uses_mailbox_; } | 73 bool uses_mailbox() const { return uses_mailbox_; } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 137 |
134 TextureLayerClient* client_; | 138 TextureLayerClient* client_; |
135 bool uses_mailbox_; | 139 bool uses_mailbox_; |
136 | 140 |
137 bool flipped_; | 141 bool flipped_; |
138 gfx::PointF uv_top_left_; | 142 gfx::PointF uv_top_left_; |
139 gfx::PointF uv_bottom_right_; | 143 gfx::PointF uv_bottom_right_; |
140 // [bottom left, top left, top right, bottom right] | 144 // [bottom left, top left, top right, bottom right] |
141 float vertex_opacity_[4]; | 145 float vertex_opacity_[4]; |
142 bool premultiplied_alpha_; | 146 bool premultiplied_alpha_; |
| 147 bool blend_background_color_; |
143 bool rate_limit_context_; | 148 bool rate_limit_context_; |
144 bool content_committed_; | 149 bool content_committed_; |
145 | 150 |
146 unsigned texture_id_; | 151 unsigned texture_id_; |
147 scoped_ptr<MailboxHolder::MainThreadReference> holder_ref_; | 152 scoped_ptr<MailboxHolder::MainThreadReference> holder_ref_; |
148 bool needs_set_mailbox_; | 153 bool needs_set_mailbox_; |
149 | 154 |
150 DISALLOW_COPY_AND_ASSIGN(TextureLayer); | 155 DISALLOW_COPY_AND_ASSIGN(TextureLayer); |
151 }; | 156 }; |
152 | 157 |
153 } // namespace cc | 158 } // namespace cc |
154 #endif // CC_LAYERS_TEXTURE_LAYER_H_ | 159 #endif // CC_LAYERS_TEXTURE_LAYER_H_ |
OLD | NEW |