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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 // Use this for special cases where the same texture is used to back the | 128 // Use this for special cases where the same texture is used to back the |
129 // TextureLayer across all frames. | 129 // TextureLayer across all frames. |
130 // WARNING: DON'T ACTUALLY USE THIS WHAT YOU ARE DOING IS WRONG. | 130 // WARNING: DON'T ACTUALLY USE THIS WHAT YOU ARE DOING IS WRONG. |
131 // TODO(danakj): Remove this when pepper doesn't need it. crbug.com/350204 | 131 // TODO(danakj): Remove this when pepper doesn't need it. crbug.com/350204 |
132 void SetTextureMailboxWithoutReleaseCallback(const TextureMailbox& mailbox); | 132 void SetTextureMailboxWithoutReleaseCallback(const TextureMailbox& mailbox); |
133 | 133 |
134 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE; | 134 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE; |
135 | 135 |
136 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE; | 136 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE; |
137 virtual bool DrawsContent() const OVERRIDE; | |
138 virtual bool Update(ResourceUpdateQueue* queue, | 137 virtual bool Update(ResourceUpdateQueue* queue, |
139 const OcclusionTracker<Layer>* occlusion) OVERRIDE; | 138 const OcclusionTracker<Layer>* occlusion) OVERRIDE; |
140 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; | 139 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; |
141 virtual Region VisibleContentOpaqueRegion() const OVERRIDE; | 140 virtual Region VisibleContentOpaqueRegion() const OVERRIDE; |
142 | 141 |
143 protected: | 142 protected: |
144 explicit TextureLayer(TextureLayerClient* client); | 143 explicit TextureLayer(TextureLayerClient* client); |
145 virtual ~TextureLayer(); | 144 virtual ~TextureLayer(); |
| 145 virtual bool HasDrawableContent() const OVERRIDE; |
146 | 146 |
147 private: | 147 private: |
148 void SetTextureMailboxInternal( | 148 void SetTextureMailboxInternal( |
149 const TextureMailbox& mailbox, | 149 const TextureMailbox& mailbox, |
150 scoped_ptr<SingleReleaseCallback> release_callback, | 150 scoped_ptr<SingleReleaseCallback> release_callback, |
151 bool requires_commit, | 151 bool requires_commit, |
152 bool allow_mailbox_reuse); | 152 bool allow_mailbox_reuse); |
153 | 153 |
154 TextureLayerClient* client_; | 154 TextureLayerClient* client_; |
155 | 155 |
156 bool flipped_; | 156 bool flipped_; |
157 gfx::PointF uv_top_left_; | 157 gfx::PointF uv_top_left_; |
158 gfx::PointF uv_bottom_right_; | 158 gfx::PointF uv_bottom_right_; |
159 // [bottom left, top left, top right, bottom right] | 159 // [bottom left, top left, top right, bottom right] |
160 float vertex_opacity_[4]; | 160 float vertex_opacity_[4]; |
161 bool premultiplied_alpha_; | 161 bool premultiplied_alpha_; |
162 bool blend_background_color_; | 162 bool blend_background_color_; |
163 bool rate_limit_context_; | 163 bool rate_limit_context_; |
164 | 164 |
165 scoped_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_; | 165 scoped_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_; |
166 bool needs_set_mailbox_; | 166 bool needs_set_mailbox_; |
167 | 167 |
168 DISALLOW_COPY_AND_ASSIGN(TextureLayer); | 168 DISALLOW_COPY_AND_ASSIGN(TextureLayer); |
169 }; | 169 }; |
170 | 170 |
171 } // namespace cc | 171 } // namespace cc |
172 #endif // CC_LAYERS_TEXTURE_LAYER_H_ | 172 #endif // CC_LAYERS_TEXTURE_LAYER_H_ |
OLD | NEW |