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

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

Issue 142003006: Android: Shallow instead of deep flush after texture consume (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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 (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_android.h" 5 #include "content/browser/renderer_host/image_transport_factory_android.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 9 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
10 #include "content/common/gpu/client/gl_helper.h" 10 #include "content/common/gpu/client/gl_helper.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 void CmdBufferImageTransportFactory::AcquireTexture( 135 void CmdBufferImageTransportFactory::AcquireTexture(
136 uint32 texture_id, const signed char* mailbox_name) { 136 uint32 texture_id, const signed char* mailbox_name) {
137 if (!context_->makeContextCurrent()) { 137 if (!context_->makeContextCurrent()) {
138 LOG(ERROR) << "Failed to make helper context current."; 138 LOG(ERROR) << "Failed to make helper context current.";
139 return; 139 return;
140 } 140 }
141 context_->bindTexture(GL_TEXTURE_2D, texture_id); 141 context_->bindTexture(GL_TEXTURE_2D, texture_id);
142 context_->consumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox_name); 142 context_->consumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox_name);
143 context_->flush(); 143 context_->shallowFlushCHROMIUM();
144 } 144 }
145 145
146 GLHelper* CmdBufferImageTransportFactory::GetGLHelper() { 146 GLHelper* CmdBufferImageTransportFactory::GetGLHelper() {
147 if (!gl_helper_) 147 if (!gl_helper_)
148 gl_helper_.reset(new GLHelper(context_->GetImplementation(), 148 gl_helper_.reset(new GLHelper(context_->GetImplementation(),
149 context_->GetContextSupport())); 149 context_->GetContextSupport()));
150 150
151 return gl_helper_.get(); 151 return gl_helper_.get();
152 } 152 }
153 153
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 void GLContextLostListener::DidLoseContext() { 188 void GLContextLostListener::DidLoseContext() {
189 delete g_factory; 189 delete g_factory;
190 g_factory = NULL; 190 g_factory = NULL;
191 FOR_EACH_OBSERVER(ImageTransportFactoryAndroidObserver, 191 FOR_EACH_OBSERVER(ImageTransportFactoryAndroidObserver,
192 g_factory_observers.Get(), 192 g_factory_observers.Get(),
193 OnLostResources()); 193 OnLostResources());
194 } 194 }
195 195
196 } // namespace content 196 } // namespace content
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