| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 // Sets whether the texture should be blended with the background color | 127 // Sets whether the texture should be blended with the background color |
| 128 // at draw time. Defaults to false. | 128 // at draw time. Defaults to false. |
| 129 void SetBlendBackgroundColor(bool blend); | 129 void SetBlendBackgroundColor(bool blend); |
| 130 | 130 |
| 131 // Code path for plugins which supply their own mailbox. | 131 // Code path for plugins which supply their own mailbox. |
| 132 void SetTextureMailbox( | 132 void SetTextureMailbox( |
| 133 const TextureMailbox& mailbox, | 133 const TextureMailbox& mailbox, |
| 134 std::unique_ptr<SingleReleaseCallback> release_callback); | 134 std::unique_ptr<SingleReleaseCallback> release_callback); |
| 135 | 135 |
| 136 // Use this for special cases where the same texture is used to back the | |
| 137 // TextureLayer across all frames. | |
| 138 // WARNING: DON'T ACTUALLY USE THIS WHAT YOU ARE DOING IS WRONG. | |
| 139 // TODO(danakj): Remove this when pepper doesn't need it. crbug.com/350204 | |
| 140 void SetTextureMailboxWithoutReleaseCallback(const TextureMailbox& mailbox); | |
| 141 | |
| 142 void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override; | 136 void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override; |
| 143 | 137 |
| 144 void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override; | 138 void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override; |
| 145 bool Update() override; | 139 bool Update() override; |
| 146 void PushPropertiesTo(LayerImpl* layer) override; | 140 void PushPropertiesTo(LayerImpl* layer) override; |
| 147 | 141 |
| 148 protected: | 142 protected: |
| 149 explicit TextureLayer(TextureLayerClient* client); | 143 explicit TextureLayer(TextureLayerClient* client); |
| 150 ~TextureLayer() override; | 144 ~TextureLayer() override; |
| 151 bool HasDrawableContent() const override; | 145 bool HasDrawableContent() const override; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 169 bool blend_background_color_; | 163 bool blend_background_color_; |
| 170 | 164 |
| 171 std::unique_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_; | 165 std::unique_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_; |
| 172 bool needs_set_mailbox_; | 166 bool needs_set_mailbox_; |
| 173 | 167 |
| 174 DISALLOW_COPY_AND_ASSIGN(TextureLayer); | 168 DISALLOW_COPY_AND_ASSIGN(TextureLayer); |
| 175 }; | 169 }; |
| 176 | 170 |
| 177 } // namespace cc | 171 } // namespace cc |
| 178 #endif // CC_LAYERS_TEXTURE_LAYER_H_ | 172 #endif // CC_LAYERS_TEXTURE_LAYER_H_ |
| OLD | NEW |