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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 | 55 |
56 // Sets whether this context should rate limit on damage to prevent too many | 56 // Sets whether this context should rate limit on damage to prevent too many |
57 // frames from being queued up before the compositor gets a chance to run. | 57 // frames from being queued up before the compositor gets a chance to run. |
58 // Requires a non-nil client. Defaults to false. | 58 // Requires a non-nil client. Defaults to false. |
59 void SetRateLimitContext(bool rate_limit); | 59 void SetRateLimitContext(bool rate_limit); |
60 | 60 |
61 // Code path for plugins which supply their own texture ID. | 61 // Code path for plugins which supply their own texture ID. |
62 void SetTextureId(unsigned texture_id); | 62 void SetTextureId(unsigned texture_id); |
63 | 63 |
64 // Code path for plugins which supply their own mailbox. | 64 // Code path for plugins which supply their own mailbox. |
65 bool uses_mailbox() const { return uses_mailbox_; } | |
65 void SetTextureMailbox(const TextureMailbox& mailbox); | 66 void SetTextureMailbox(const TextureMailbox& mailbox); |
66 | 67 |
67 void WillModifyTexture(); | 68 void WillModifyTexture(); |
68 | 69 |
69 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE; | 70 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE; |
70 | 71 |
71 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE; | 72 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE; |
72 virtual bool DrawsContent() const OVERRIDE; | 73 virtual bool DrawsContent() const OVERRIDE; |
73 virtual void Update(ResourceUpdateQueue* queue, | 74 virtual void Update(ResourceUpdateQueue* queue, |
74 const OcclusionTracker* occlusion, | 75 const OcclusionTracker* occlusion, |
75 RenderingStats* stats) OVERRIDE; | 76 RenderingStats* stats) OVERRIDE; |
76 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; | 77 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; |
77 virtual bool BlocksPendingCommit() const OVERRIDE; | 78 virtual bool BlocksPendingCommit() const OVERRIDE; |
78 | 79 |
79 virtual bool CanClipSelf() const OVERRIDE; | 80 virtual bool CanClipSelf() const OVERRIDE; |
80 | 81 |
81 protected: | 82 protected: |
82 TextureLayer(TextureLayerClient* client, bool uses_mailbox); | 83 TextureLayer(TextureLayerClient* client, bool uses_mailbox); |
83 virtual ~TextureLayer(); | 84 virtual ~TextureLayer(); |
84 | 85 |
85 private: | 86 private: |
86 TextureLayerClient* client_; | 87 TextureLayerClient* client_; |
87 bool uses_mailbox_; | 88 const bool uses_mailbox_; |
danakj
2013/05/23 15:34:33
const things should be kFooBar. I'd prefer to not
slavi
2013/05/28 18:55:13
Done.
| |
88 | 89 |
89 bool flipped_; | 90 bool flipped_; |
90 gfx::PointF uv_top_left_; | 91 gfx::PointF uv_top_left_; |
91 gfx::PointF uv_bottom_right_; | 92 gfx::PointF uv_bottom_right_; |
92 // [bottom left, top left, top right, bottom right] | 93 // [bottom left, top left, top right, bottom right] |
93 float vertex_opacity_[4]; | 94 float vertex_opacity_[4]; |
94 bool premultiplied_alpha_; | 95 bool premultiplied_alpha_; |
95 bool rate_limit_context_; | 96 bool rate_limit_context_; |
96 bool context_lost_; | 97 bool context_lost_; |
97 bool content_committed_; | 98 bool content_committed_; |
98 | 99 |
99 unsigned texture_id_; | 100 unsigned texture_id_; |
100 TextureMailbox texture_mailbox_; | 101 TextureMailbox mailbox_; |
danakj
2013/05/23 15:34:33
Prefer to keep this variable name as is. It's not
slavi
2013/05/28 18:55:13
Done.
| |
101 bool own_mailbox_; | 102 bool own_mailbox_; |
102 | 103 |
103 DISALLOW_COPY_AND_ASSIGN(TextureLayer); | 104 DISALLOW_COPY_AND_ASSIGN(TextureLayer); |
104 }; | 105 }; |
105 | 106 |
106 } // namespace cc | 107 } // namespace cc |
107 #endif // CC_LAYERS_TEXTURE_LAYER_H_ | 108 #endif // CC_LAYERS_TEXTURE_LAYER_H_ |
OLD | NEW |