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

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

Issue 1937173002: Revert of 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, 7 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') | no next file with comments »
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
136 void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override; 142 void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override;
137 143
138 void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override; 144 void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override;
139 bool Update() override; 145 bool Update() override;
140 void PushPropertiesTo(LayerImpl* layer) override; 146 void PushPropertiesTo(LayerImpl* layer) override;
141 147
142 protected: 148 protected:
143 explicit TextureLayer(TextureLayerClient* client); 149 explicit TextureLayer(TextureLayerClient* client);
144 ~TextureLayer() override; 150 ~TextureLayer() override;
145 bool HasDrawableContent() const override; 151 bool HasDrawableContent() const override;
(...skipping 17 matching lines...) Expand all
163 bool blend_background_color_; 169 bool blend_background_color_;
164 170
165 std::unique_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_; 171 std::unique_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_;
166 bool needs_set_mailbox_; 172 bool needs_set_mailbox_;
167 173
168 DISALLOW_COPY_AND_ASSIGN(TextureLayer); 174 DISALLOW_COPY_AND_ASSIGN(TextureLayer);
169 }; 175 };
170 176
171 } // namespace cc 177 } // namespace cc
172 #endif // CC_LAYERS_TEXTURE_LAYER_H_ 178 #endif // CC_LAYERS_TEXTURE_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/texture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698