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

Side by Side Diff: content/browser/aura/gpu_process_transport_factory.cc

Issue 117233006: Port content::GLHelper over to GLES2Interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NULL-check gl->GetString(GL_EXTENSIONS) 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 | « PRESUBMIT.py ('k') | content/browser/aura/no_transport_image_transport_factory.cc » ('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/browser/aura/gpu_process_transport_factory.h" 5 #include "content/browser/aura/gpu_process_transport_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 scoped_refptr<OwnedTexture> image(new OwnedTexture( 331 scoped_refptr<OwnedTexture> image(new OwnedTexture(
332 provider, size, device_scale_factor, texture_id)); 332 provider, size, device_scale_factor, texture_id));
333 return image; 333 return image;
334 } 334 }
335 335
336 GLHelper* GpuProcessTransportFactory::GetGLHelper() { 336 GLHelper* GpuProcessTransportFactory::GetGLHelper() {
337 if (!gl_helper_) { 337 if (!gl_helper_) {
338 scoped_refptr<cc::ContextProvider> provider = 338 scoped_refptr<cc::ContextProvider> provider =
339 SharedMainThreadContextProvider(); 339 SharedMainThreadContextProvider();
340 if (provider.get()) 340 if (provider.get())
341 gl_helper_.reset(new GLHelper(provider->Context3d(), 341 gl_helper_.reset(new GLHelper(provider->ContextGL(),
342 provider->ContextSupport())); 342 provider->ContextSupport()));
343 } 343 }
344 return gl_helper_.get(); 344 return gl_helper_.get();
345 } 345 }
346 346
347 uint32 GpuProcessTransportFactory::InsertSyncPoint() { 347 uint32 GpuProcessTransportFactory::InsertSyncPoint() {
348 scoped_refptr<cc::ContextProvider> provider = 348 scoped_refptr<cc::ContextProvider> provider =
349 SharedMainThreadContextProvider(); 349 SharedMainThreadContextProvider();
350 if (!provider.get()) 350 if (!provider.get())
351 return 0; 351 return 0;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 observer_list_, 497 observer_list_,
498 OnLostResources()); 498 OnLostResources());
499 499
500 // Kill things that use the shared context before killing the shared context. 500 // Kill things that use the shared context before killing the shared context.
501 lost_gl_helper.reset(); 501 lost_gl_helper.reset();
502 lost_offscreen_compositor_contexts = NULL; 502 lost_offscreen_compositor_contexts = NULL;
503 lost_shared_main_thread_contexts = NULL; 503 lost_shared_main_thread_contexts = NULL;
504 } 504 }
505 505
506 } // namespace content 506 } // namespace content
OLDNEW
« no previous file with comments | « PRESUBMIT.py ('k') | content/browser/aura/no_transport_image_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698