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

Unified Diff: ui/gl/gl_context.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_cgl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context.cc
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index 533b7d3146e89de6242720d611f9d967bde6dd94..e35806917f3e15cbc87f77124a8fa4c73d850e80 100644
--- a/ui/gl/gl_context.cc
+++ b/ui/gl/gl_context.cc
@@ -82,6 +82,10 @@ bool GLContext::GetTotalGpuMemory(size_t* bytes) {
void GLContext::SetSafeToForceGpuSwitch() {
}
+bool GLContext::ForceGpuSwitchIfNeeded() {
+ return true;
+}
+
void GLContext::SetUnbindFboOnMakeCurrent() {
NOTIMPLEMENTED();
}
@@ -199,6 +203,8 @@ void GLContext::SetupForVirtualization() {
bool GLContext::MakeVirtuallyCurrent(
GLContext* virtual_context, GLSurface* surface) {
DCHECK(virtual_gl_api_);
+ if (!ForceGpuSwitchIfNeeded())
+ return false;
return virtual_gl_api_->MakeCurrent(virtual_context, surface);
}
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_cgl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698