summaryrefslogtreecommitdiff
path: root/chromium/ui/gl/gl_context_egl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/gl/gl_context_egl.cc')
-rw-r--r--chromium/ui/gl/gl_context_egl.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chromium/ui/gl/gl_context_egl.cc b/chromium/ui/gl/gl_context_egl.cc
index cbcb9bc6bdd..329fbfbf938 100644
--- a/chromium/ui/gl/gl_context_egl.cc
+++ b/chromium/ui/gl/gl_context_egl.cc
@@ -269,6 +269,18 @@ YUVToRGBConverter* GLContextEGL::GetYUVToRGBConverter(
return yuv_to_rgb_converter.get();
}
+void GLContextEGL::SetVisibility(bool visibility) {
+ if (GLSurfaceEGL::IsANGLEPowerPreferenceSupported()) {
+ // It doesn't matter whether this context was explicitly allocated
+ // with a power preference - ANGLE will take care of any default behavior.
+ if (visibility) {
+ eglReacquireHighPowerGPUANGLE(display_, context_);
+ } else {
+ eglReleaseHighPowerGPUANGLE(display_, context_);
+ }
+ }
+}
+
void GLContextEGL::ReleaseYUVToRGBConvertersAndBackpressureFences() {
#if defined(OS_MACOSX)
bool has_backpressure_fences = HasBackpressureFences();