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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin_compositing_helper.cc

Issue 12374028: Allow WebExternalTextureLayerClient to work with mailboxes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Linker Fix Created 7 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 | « cc/layers/texture_layer_unittest.cc ('k') | ui/compositor/layer.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "content/renderer/browser_plugin/browser_plugin_compositing_helper.h" 5 #include "content/renderer/browser_plugin/browser_plugin_compositing_helper.h"
6 6
7 #include "cc/layers/delegated_renderer_layer.h" 7 #include "cc/layers/delegated_renderer_layer.h"
8 #include "cc/layers/solid_color_layer.h" 8 #include "cc/layers/solid_color_layer.h"
9 #include "cc/layers/texture_layer.h" 9 #include "cc/layers/texture_layer.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 last_host_id_ = gpu_host_id; 213 last_host_id_ = gpu_host_id;
214 214
215 ack_pending_ = true; 215 ack_pending_ = true;
216 // Browser plugin getting destroyed, do a fast ACK. 216 // Browser plugin getting destroyed, do a fast ACK.
217 if (!background_layer_) { 217 if (!background_layer_) {
218 MailboxReleased(mailbox_name, gpu_route_id, gpu_host_id, 0, false); 218 MailboxReleased(mailbox_name, gpu_route_id, gpu_host_id, 0, false);
219 return; 219 return;
220 } 220 }
221 221
222 if (!texture_layer_) { 222 if (!texture_layer_) {
223 texture_layer_ = cc::TextureLayer::CreateForMailbox(); 223 texture_layer_ = cc::TextureLayer::CreateForMailbox(NULL);
224 texture_layer_->SetIsDrawable(true); 224 texture_layer_->SetIsDrawable(true);
225 texture_layer_->SetContentsOpaque(true); 225 texture_layer_->SetContentsOpaque(true);
226 226
227 background_layer_->AddChild(texture_layer_); 227 background_layer_->AddChild(texture_layer_);
228 } 228 }
229 229
230 // The size of browser plugin container is not always equal to the size 230 // The size of browser plugin container is not always equal to the size
231 // of the buffer that arrives here. This could be for a number of reasons, 231 // of the buffer that arrives here. This could be for a number of reasons,
232 // including autosize and a resize in progress. 232 // including autosize and a resize in progress.
233 // During resize, the container size changes first and then some time 233 // During resize, the container size changes first and then some time
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 291 }
292 292
293 void BrowserPluginCompositingHelper::UpdateVisibility(bool visible) { 293 void BrowserPluginCompositingHelper::UpdateVisibility(bool visible) {
294 if (texture_layer_) 294 if (texture_layer_)
295 texture_layer_->SetIsDrawable(visible); 295 texture_layer_->SetIsDrawable(visible);
296 if (delegated_layer_) 296 if (delegated_layer_)
297 delegated_layer_->SetIsDrawable(visible); 297 delegated_layer_->SetIsDrawable(visible);
298 } 298 }
299 299
300 } // namespace content 300 } // namespace content
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_unittest.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698