Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(898)

Side by Side Diff: cc/layers/texture_layer.h

Issue 1912833002: Pepper takes ownership of a mailbox before passing it to the texture layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/texture_layer.cc » ('j') | cc/layers/texture_layer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/texture_layer.cc » ('j') | cc/layers/texture_layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698