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

Side by Side Diff: content/common/gpu/gpu_channel_manager.cc

Issue 94963003: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Improve Windows initialization and renderBufferMultisample explanation Created 7 years 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
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/common/gpu/gpu_channel_manager.h" 5 #include "content/common/gpu/gpu_channel_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "content/child/child_thread.h" 9 #include "content/child/child_thread.h"
10 #include "content/common/gpu/gpu_channel.h" 10 #include "content/common/gpu/gpu_channel.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 gpu_channels_.clear(); 51 gpu_channels_.clear();
52 if (default_offscreen_surface_.get()) { 52 if (default_offscreen_surface_.get()) {
53 default_offscreen_surface_->Destroy(); 53 default_offscreen_surface_->Destroy();
54 default_offscreen_surface_ = NULL; 54 default_offscreen_surface_ = NULL;
55 } 55 }
56 DCHECK(image_operations_.empty()); 56 DCHECK(image_operations_.empty());
57 } 57 }
58 58
59 gpu::gles2::ProgramCache* GpuChannelManager::program_cache() { 59 gpu::gles2::ProgramCache* GpuChannelManager::program_cache() {
60 if (!program_cache_.get() && 60 if (!program_cache_.get() &&
61 (gfx::g_driver_gl.ext.b_ARB_get_program_binary || 61 (gfx::g_driver_gl.ext.b_GL_ARB_get_program_binary ||
62 gfx::g_driver_gl.ext.b_OES_get_program_binary) && 62 gfx::g_driver_gl.ext.b_GL_OES_get_program_binary) &&
63 !CommandLine::ForCurrentProcess()->HasSwitch( 63 !CommandLine::ForCurrentProcess()->HasSwitch(
64 switches::kDisableGpuProgramCache)) { 64 switches::kDisableGpuProgramCache)) {
65 program_cache_.reset(new gpu::gles2::MemoryProgramCache()); 65 program_cache_.reset(new gpu::gles2::MemoryProgramCache());
66 } 66 }
67 return program_cache_.get(); 67 return program_cache_.get();
68 } 68 }
69 69
70 void GpuChannelManager::RemoveChannel(int client_id) { 70 void GpuChannelManager::RemoveChannel(int client_id) {
71 Send(new GpuHostMsg_DestroyChannel(client_id)); 71 Send(new GpuHostMsg_DestroyChannel(client_id));
72 gpu_channels_.erase(client_id); 72 gpu_channels_.erase(client_id);
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { 295 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() {
296 if (!default_offscreen_surface_.get()) { 296 if (!default_offscreen_surface_.get()) {
297 default_offscreen_surface_ = 297 default_offscreen_surface_ =
298 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); 298 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1));
299 } 299 }
300 return default_offscreen_surface_.get(); 300 return default_offscreen_surface_.get();
301 } 301 }
302 302
303 } // namespace content 303 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/aura/software_output_device_ozone_unittest.cc ('k') | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698