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

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

Issue 1420533009: Cleanup GpuMemoryManager and helpers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanup. Created 5 years, 1 month 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
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_android.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) 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/bind.h" 7 #include "base/bind.h"
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 share_group_->AddContext(this); 59 share_group_->AddContext(this);
60 } 60 }
61 61
62 GLContext::~GLContext() { 62 GLContext::~GLContext() {
63 share_group_->RemoveContext(this); 63 share_group_->RemoveContext(this);
64 if (GetCurrent() == this) { 64 if (GetCurrent() == this) {
65 SetCurrent(nullptr); 65 SetCurrent(nullptr);
66 } 66 }
67 } 67 }
68 68
69 bool GLContext::GetTotalGpuMemory(size_t* bytes) {
70 DCHECK(bytes);
71 *bytes = 0;
72 return false;
73 }
74
75 void GLContext::SetSafeToForceGpuSwitch() { 69 void GLContext::SetSafeToForceGpuSwitch() {
76 } 70 }
77 71
78 bool GLContext::ForceGpuSwitchIfNeeded() { 72 bool GLContext::ForceGpuSwitchIfNeeded() {
79 return true; 73 return true;
80 } 74 }
81 75
82 void GLContext::SetUnbindFboOnMakeCurrent() { 76 void GLContext::SetUnbindFboOnMakeCurrent() {
83 NOTIMPLEMENTED(); 77 NOTIMPLEMENTED();
84 } 78 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 241 }
248 242
249 GLContextReal::~GLContextReal() {} 243 GLContextReal::~GLContextReal() {}
250 244
251 void GLContextReal::SetCurrent(GLSurface* surface) { 245 void GLContextReal::SetCurrent(GLSurface* surface) {
252 GLContext::SetCurrent(surface); 246 GLContext::SetCurrent(surface);
253 current_real_context_.Pointer()->Set(surface ? this : nullptr); 247 current_real_context_.Pointer()->Set(surface ? this : nullptr);
254 } 248 }
255 249
256 } // namespace gfx 250 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698