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

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: Rebase 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_client.h ('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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 last_host_id_ = gpu_host_id; 206 last_host_id_ = gpu_host_id;
207 207
208 ack_pending_ = true; 208 ack_pending_ = true;
209 // Browser plugin getting destroyed, do a fast ACK. 209 // Browser plugin getting destroyed, do a fast ACK.
210 if (!background_layer_) { 210 if (!background_layer_) {
211 MailboxReleased(mailbox_name, gpu_route_id, gpu_host_id, 0); 211 MailboxReleased(mailbox_name, gpu_route_id, gpu_host_id, 0);
212 return; 212 return;
213 } 213 }
214 214
215 if (!texture_layer_) { 215 if (!texture_layer_) {
216 texture_layer_ = cc::TextureLayer::CreateForMailbox(); 216 texture_layer_ = cc::TextureLayer::CreateForMailbox(NULL);
217 texture_layer_->SetIsDrawable(true); 217 texture_layer_->SetIsDrawable(true);
218 texture_layer_->SetContentsOpaque(true); 218 texture_layer_->SetContentsOpaque(true);
219 219
220 background_layer_->AddChild(texture_layer_); 220 background_layer_->AddChild(texture_layer_);
221 } 221 }
222 222
223 // The size of browser plugin container is not always equal to the size 223 // The size of browser plugin container is not always equal to the size
224 // of the buffer that arrives here. This could be for a number of reasons, 224 // of the buffer that arrives here. This could be for a number of reasons,
225 // including autosize and a resize in progress. 225 // including autosize and a resize in progress.
226 // During resize, the container size changes first and then some time 226 // During resize, the container size changes first and then some time
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } 284 }
285 285
286 void BrowserPluginCompositingHelper::UpdateVisibility(bool visible) { 286 void BrowserPluginCompositingHelper::UpdateVisibility(bool visible) {
287 if (texture_layer_) 287 if (texture_layer_)
288 texture_layer_->SetIsDrawable(visible); 288 texture_layer_->SetIsDrawable(visible);
289 if (delegated_layer_) 289 if (delegated_layer_)
290 delegated_layer_->SetIsDrawable(visible); 290 delegated_layer_->SetIsDrawable(visible);
291 } 291 }
292 292
293 } // namespace content 293 } // namespace content
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_client.h ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698