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

Side by Side Diff: webkit/renderer/compositor_bindings/web_external_texture_layer_impl.cc

Issue 282673002: Pass information about overlay support in a mailbox from blink to CC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h" 5 #include "webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h"
6 6
7 #include "cc/layers/texture_layer.h" 7 #include "cc/layers/texture_layer.h"
8 #include "cc/resources/resource_update_queue.h" 8 #include "cc/resources/resource_update_queue.h"
9 #include "cc/resources/single_release_callback.h" 9 #include "cc/resources/single_release_callback.h"
10 #include "cc/resources/texture_mailbox.h" 10 #include "cc/resources/texture_mailbox.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return false; 75 return false;
76 } 76 }
77 gpu::Mailbox name; 77 gpu::Mailbox name;
78 name.SetName(client_mailbox.name); 78 name.SetName(client_mailbox.name);
79 if (bitmap) { 79 if (bitmap) {
80 *mailbox = cc::TextureMailbox(bitmap->shared_memory(), bitmap->size()); 80 *mailbox = cc::TextureMailbox(bitmap->shared_memory(), bitmap->size());
81 } else { 81 } else {
82 *mailbox = 82 *mailbox =
83 cc::TextureMailbox(name, GL_TEXTURE_2D, client_mailbox.syncPoint); 83 cc::TextureMailbox(name, GL_TEXTURE_2D, client_mailbox.syncPoint);
84 } 84 }
85 mailbox->set_allow_overlay(client_mailbox.allowOverlay);
85 86
86 if (mailbox->IsValid()) { 87 if (mailbox->IsValid()) {
87 *release_callback = cc::SingleReleaseCallback::Create(base::Bind( 88 *release_callback = cc::SingleReleaseCallback::Create(base::Bind(
88 &WebExternalTextureLayerImpl::DidReleaseMailbox, 89 &WebExternalTextureLayerImpl::DidReleaseMailbox,
89 this->AsWeakPtr(), 90 this->AsWeakPtr(),
90 client_mailbox, 91 client_mailbox,
91 bitmap)); 92 bitmap));
92 } 93 }
93 94
94 return true; 95 return true;
(...skipping 22 matching lines...) Expand all
117 118
118 blink::WebExternalTextureMailbox available_mailbox; 119 blink::WebExternalTextureMailbox available_mailbox;
119 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); 120 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name));
120 available_mailbox.syncPoint = sync_point; 121 available_mailbox.syncPoint = sync_point;
121 if (bitmap) 122 if (bitmap)
122 layer->free_bitmaps_.push_back(bitmap); 123 layer->free_bitmaps_.push_back(bitmap);
123 layer->client_->mailboxReleased(available_mailbox); 124 layer->client_->mailboxReleased(available_mailbox);
124 } 125 }
125 126
126 } // namespace webkit 127 } // namespace webkit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698