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

Side by Side Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 11779023: Aura: A little lighter GL synchronization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bind the textures because client side expects it. Created 7 years, 11 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 | gpu/GLES2/extensions/CHROMIUM/CHROMIUM_texture_mailbox.txt » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/renderer_host/image_transport_factory.h" 5 #include "content/browser/renderer_host/image_transport_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 mailbox_name_ = mailbox_name; 164 mailbox_name_ = mailbox_name;
165 if (mailbox_name.empty()) 165 if (mailbox_name.empty())
166 return; 166 return;
167 167
168 DCHECK(host_context_ && texture_id_); 168 DCHECK(host_context_ && texture_id_);
169 host_context_->bindTexture(GL_TEXTURE_2D, texture_id_); 169 host_context_->bindTexture(GL_TEXTURE_2D, texture_id_);
170 host_context_->consumeTextureCHROMIUM( 170 host_context_->consumeTextureCHROMIUM(
171 GL_TEXTURE_2D, 171 GL_TEXTURE_2D,
172 reinterpret_cast<const signed char*>(mailbox_name.c_str())); 172 reinterpret_cast<const signed char*>(mailbox_name.c_str()));
173 size_ = new_size; 173 size_ = new_size;
174 host_context_->flush(); 174 host_context_->shallowFlushCHROMIUM();
175 } 175 }
176 176
177 virtual std::string Produce() OVERRIDE { 177 virtual std::string Produce() OVERRIDE {
178 std::string name; 178 std::string name;
179 if (!mailbox_name_.empty()) { 179 if (!mailbox_name_.empty()) {
180 DCHECK(host_context_ && texture_id_); 180 DCHECK(host_context_ && texture_id_);
181 host_context_->bindTexture(GL_TEXTURE_2D, texture_id_); 181 host_context_->bindTexture(GL_TEXTURE_2D, texture_id_);
182 host_context_->produceTextureCHROMIUM( 182 host_context_->produceTextureCHROMIUM(
183 GL_TEXTURE_2D, 183 GL_TEXTURE_2D,
184 reinterpret_cast<const signed char*>(mailbox_name_.c_str())); 184 reinterpret_cast<const signed char*>(mailbox_name_.c_str()));
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 delete g_factory; 636 delete g_factory;
637 g_factory = NULL; 637 g_factory = NULL;
638 } 638 }
639 639
640 // static 640 // static
641 ImageTransportFactory* ImageTransportFactory::GetInstance() { 641 ImageTransportFactory* ImageTransportFactory::GetInstance() {
642 return g_factory; 642 return g_factory;
643 } 643 }
644 644
645 } // namespace content 645 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | gpu/GLES2/extensions/CHROMIUM/CHROMIUM_texture_mailbox.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698