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

Side by Side Diff: gpu/command_buffer/service/gl_context_virtual.cc

Issue 13957008: Merge 193302 "Force GPU switch with CGLSetVirtualScreen only for..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1453/src/
Patch Set: Created 7 years, 8 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
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 "gpu/command_buffer/service/gl_context_virtual.h" 5 #include "gpu/command_buffer/service/gl_context_virtual.h"
6 6
7 #include "gpu/command_buffer/service/gl_state_restorer_impl.h" 7 #include "gpu/command_buffer/service/gl_state_restorer_impl.h"
8 #include "ui/gl/gl_surface.h" 8 #include "ui/gl/gl_surface.h"
9 9
10 namespace gpu { 10 namespace gpu {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 std::string GLContextVirtual::GetExtensions() { 86 std::string GLContextVirtual::GetExtensions() {
87 return shared_context_->GetExtensions(); 87 return shared_context_->GetExtensions();
88 } 88 }
89 89
90 bool GLContextVirtual::GetTotalGpuMemory(size_t* bytes) { 90 bool GLContextVirtual::GetTotalGpuMemory(size_t* bytes) {
91 return shared_context_->GetTotalGpuMemory(bytes); 91 return shared_context_->GetTotalGpuMemory(bytes);
92 } 92 }
93 93
94 void GLContextVirtual::SetSafeToForceGpuSwitch() {
95 // TODO(ccameron): This will not work if two contexts that disagree
96 // about whether or not forced gpu switching may be done both share
97 // the same underlying shared_context_.
98 return shared_context_->SetSafeToForceGpuSwitch();
99 }
100
94 bool GLContextVirtual::WasAllocatedUsingRobustnessExtension() { 101 bool GLContextVirtual::WasAllocatedUsingRobustnessExtension() {
95 return shared_context_->WasAllocatedUsingRobustnessExtension(); 102 return shared_context_->WasAllocatedUsingRobustnessExtension();
96 } 103 }
97 104
98 GLContextVirtual::~GLContextVirtual() { 105 GLContextVirtual::~GLContextVirtual() {
99 Destroy(); 106 Destroy();
100 } 107 }
101 108
102 } // namespace gpu 109 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gl_context_virtual.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698