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

Side by Side Diff: ui/gl/gl_context.cc

Issue 13852023: Reland "gpu: Fix Vivante's "hisilicon" GPUs" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@HUAWEI_revert
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
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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/threading/thread_local.h" 10 #include "base/threading/thread_local.h"
(...skipping 27 matching lines...) Expand all
38 38
39 bool GLContext::GetTotalGpuMemory(size_t* bytes) { 39 bool GLContext::GetTotalGpuMemory(size_t* bytes) {
40 DCHECK(bytes); 40 DCHECK(bytes);
41 *bytes = 0; 41 *bytes = 0;
42 return false; 42 return false;
43 } 43 }
44 44
45 void GLContext::SetSafeToForceGpuSwitch() { 45 void GLContext::SetSafeToForceGpuSwitch() {
46 } 46 }
47 47
48 void GLContext::SetRecreateSurfaceOnMakeCurrent() {
49 NOTIMPLEMENTED();
50 }
51
48 std::string GLContext::GetExtensions() { 52 std::string GLContext::GetExtensions() {
49 DCHECK(IsCurrent(NULL)); 53 DCHECK(IsCurrent(NULL));
50 const char* ext = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)); 54 const char* ext = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
51 return std::string(ext ? ext : ""); 55 return std::string(ext ? ext : "");
52 } 56 }
53 57
54 bool GLContext::HasExtension(const char* name) { 58 bool GLContext::HasExtension(const char* name) {
55 std::string extensions = GetExtensions(); 59 std::string extensions = GetExtensions();
56 extensions += " "; 60 extensions += " ";
57 61
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void GLContext::OnDestroyVirtualContext(GLContext* virtual_context) { 130 void GLContext::OnDestroyVirtualContext(GLContext* virtual_context) {
127 if (virtual_gl_api_) 131 if (virtual_gl_api_)
128 virtual_gl_api_->OnDestroyVirtualContext(virtual_context); 132 virtual_gl_api_->OnDestroyVirtualContext(virtual_context);
129 } 133 }
130 134
131 void GLContext::SetRealGLApi() { 135 void GLContext::SetRealGLApi() {
132 SetGLToRealGLApi(); 136 SetGLToRealGLApi();
133 } 137 }
134 138
135 } // namespace gfx 139 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698