| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // ReturnAndReleaseOnImplThread() defines their values. | 79 // ReturnAndReleaseOnImplThread() defines their values. |
| 80 base::Lock arguments_lock_; | 80 base::Lock arguments_lock_; |
| 81 uint32 sync_point_; | 81 uint32 sync_point_; |
| 82 bool is_lost_; | 82 bool is_lost_; |
| 83 base::ThreadChecker main_thread_checker_; | 83 base::ThreadChecker main_thread_checker_; |
| 84 DISALLOW_COPY_AND_ASSIGN(TextureMailboxHolder); | 84 DISALLOW_COPY_AND_ASSIGN(TextureMailboxHolder); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 // Used when mailbox names are specified instead of texture IDs. | 87 // Used when mailbox names are specified instead of texture IDs. |
| 88 static scoped_refptr<TextureLayer> CreateForMailbox( | 88 static scoped_refptr<TextureLayer> CreateForMailbox( |
| 89 const LayerSettings& settings, |
| 89 TextureLayerClient* client); | 90 TextureLayerClient* client); |
| 90 | 91 |
| 91 // Resets the client, which also resets the texture. | 92 // Resets the client, which also resets the texture. |
| 92 void ClearClient(); | 93 void ClearClient(); |
| 93 | 94 |
| 94 // Resets the texture. | 95 // Resets the texture. |
| 95 void ClearTexture(); | 96 void ClearTexture(); |
| 96 | 97 |
| 97 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 98 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
| 98 | 99 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 141 |
| 141 void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override; | 142 void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override; |
| 142 | 143 |
| 143 void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override; | 144 void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override; |
| 144 bool Update(ResourceUpdateQueue* queue, | 145 bool Update(ResourceUpdateQueue* queue, |
| 145 const OcclusionTracker<Layer>* occlusion) override; | 146 const OcclusionTracker<Layer>* occlusion) override; |
| 146 void PushPropertiesTo(LayerImpl* layer) override; | 147 void PushPropertiesTo(LayerImpl* layer) override; |
| 147 SimpleEnclosedRegion VisibleContentOpaqueRegion() const override; | 148 SimpleEnclosedRegion VisibleContentOpaqueRegion() const override; |
| 148 | 149 |
| 149 protected: | 150 protected: |
| 150 explicit TextureLayer(TextureLayerClient* client); | 151 TextureLayer(const LayerSettings& settings, TextureLayerClient* client); |
| 151 ~TextureLayer() override; | 152 ~TextureLayer() override; |
| 152 bool HasDrawableContent() const override; | 153 bool HasDrawableContent() const override; |
| 153 | 154 |
| 154 private: | 155 private: |
| 155 void SetTextureMailboxInternal( | 156 void SetTextureMailboxInternal( |
| 156 const TextureMailbox& mailbox, | 157 const TextureMailbox& mailbox, |
| 157 scoped_ptr<SingleReleaseCallback> release_callback, | 158 scoped_ptr<SingleReleaseCallback> release_callback, |
| 158 bool requires_commit, | 159 bool requires_commit, |
| 159 bool allow_mailbox_reuse); | 160 bool allow_mailbox_reuse); |
| 160 | 161 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 171 bool rate_limit_context_; | 172 bool rate_limit_context_; |
| 172 | 173 |
| 173 scoped_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_; | 174 scoped_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_; |
| 174 bool needs_set_mailbox_; | 175 bool needs_set_mailbox_; |
| 175 | 176 |
| 176 DISALLOW_COPY_AND_ASSIGN(TextureLayer); | 177 DISALLOW_COPY_AND_ASSIGN(TextureLayer); |
| 177 }; | 178 }; |
| 178 | 179 |
| 179 } // namespace cc | 180 } // namespace cc |
| 180 #endif // CC_LAYERS_TEXTURE_LAYER_H_ | 181 #endif // CC_LAYERS_TEXTURE_LAYER_H_ |
| OLD | NEW |