| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Sets whether the texture should be blended with the background color | 113 // Sets whether the texture should be blended with the background color |
| 114 // at draw time. Defaults to false. | 114 // at draw time. Defaults to false. |
| 115 void SetBlendBackgroundColor(bool blend); | 115 void SetBlendBackgroundColor(bool blend); |
| 116 | 116 |
| 117 // Sets whether this context should rate limit on damage to prevent too many | 117 // Sets whether this context should rate limit on damage to prevent too many |
| 118 // frames from being queued up before the compositor gets a chance to run. | 118 // frames from being queued up before the compositor gets a chance to run. |
| 119 // Requires a non-nil client. Defaults to false. | 119 // Requires a non-nil client. Defaults to false. |
| 120 void SetRateLimitContext(bool rate_limit); | 120 void SetRateLimitContext(bool rate_limit); |
| 121 | 121 |
| 122 // Code path for plugins which supply their own texture ID. | 122 // Code path for plugins which supply their own texture ID. |
| 123 // DEPRECATED. DO NOT USE. | |
| 124 void SetTextureId(unsigned texture_id); | 123 void SetTextureId(unsigned texture_id); |
| 125 | 124 |
| 126 // Code path for plugins which supply their own mailbox. | 125 // Code path for plugins which supply their own mailbox. |
| 127 bool uses_mailbox() const { return uses_mailbox_; } | 126 bool uses_mailbox() const { return uses_mailbox_; } |
| 128 void SetTextureMailbox(const TextureMailbox& mailbox); | 127 void SetTextureMailbox(const TextureMailbox& mailbox); |
| 129 | 128 |
| 130 void WillModifyTexture(); | 129 void WillModifyTexture(); |
| 131 | 130 |
| 132 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE; | 131 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE; |
| 133 | 132 |
| 134 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE; | 133 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE; |
| 135 virtual bool DrawsContent() const OVERRIDE; | 134 virtual bool DrawsContent() const OVERRIDE; |
| 136 virtual bool Update(ResourceUpdateQueue* queue, | 135 virtual bool Update(ResourceUpdateQueue* queue, |
| 137 const OcclusionTracker* occlusion) OVERRIDE; | 136 const OcclusionTracker* occlusion) OVERRIDE; |
| 138 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; | 137 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; |
| 139 virtual Region VisibleContentOpaqueRegion() const OVERRIDE; | 138 virtual Region VisibleContentOpaqueRegion() const OVERRIDE; |
| 139 virtual bool BlocksPendingCommit() const OVERRIDE; |
| 140 | 140 |
| 141 virtual bool CanClipSelf() const OVERRIDE; | 141 virtual bool CanClipSelf() const OVERRIDE; |
| 142 | 142 |
| 143 protected: | 143 protected: |
| 144 TextureLayer(TextureLayerClient* client, bool uses_mailbox); | 144 TextureLayer(TextureLayerClient* client, bool uses_mailbox); |
| 145 virtual ~TextureLayer(); | 145 virtual ~TextureLayer(); |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 TextureLayerClient* client_; | 148 TextureLayerClient* client_; |
| 149 bool uses_mailbox_; | 149 bool uses_mailbox_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 160 | 160 |
| 161 unsigned texture_id_; | 161 unsigned texture_id_; |
| 162 scoped_ptr<MailboxHolder::MainThreadReference> holder_ref_; | 162 scoped_ptr<MailboxHolder::MainThreadReference> holder_ref_; |
| 163 bool needs_set_mailbox_; | 163 bool needs_set_mailbox_; |
| 164 | 164 |
| 165 DISALLOW_COPY_AND_ASSIGN(TextureLayer); | 165 DISALLOW_COPY_AND_ASSIGN(TextureLayer); |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace cc | 168 } // namespace cc |
| 169 #endif // CC_LAYERS_TEXTURE_LAYER_H_ | 169 #endif // CC_LAYERS_TEXTURE_LAYER_H_ |
| OLD | NEW |