summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorccameron <ccameron@chromium.org>2015-08-13 14:29:47 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-13 21:30:19 +0000
commit0009e1ea4154c5a20fffa3cf47b0b29c23a6f7e2 (patch)
tree07de596c633c89b7f0ed976927468618a2507bb5 /ui
parent64d923cbb60f7ac1d7d21e63224b8120bd323f1c (diff)
downloadchromium_src-0009e1ea4154c5a20fffa3cf47b0b29c23a6f7e2.zip
chromium_src-0009e1ea4154c5a20fffa3cf47b0b29c23a6f7e2.tar.gz
chromium_src-0009e1ea4154c5a20fffa3cf47b0b29c23a6f7e2.tar.bz2
Mac Overlays: Make ImageTransportSurfaceOverlayMac observe GPU switches
When the GPU switches, create a new OpenGL context, to see which GL renderer it uses. Whenever a context is made current to the surface, ensure that the context is using the appropriate renderer. Ideally, the GpuSwitchingManager should be able to tell the observers which GL renderer to use, but that is not currently wired up. BUG=519097 Review URL: https://codereview.chromium.org/1291703002 Cr-Commit-Position: refs/heads/master@{#343277}
Diffstat (limited to 'ui')
-rw-r--r--ui/accelerated_widget_mac/io_surface_context.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/accelerated_widget_mac/io_surface_context.h b/ui/accelerated_widget_mac/io_surface_context.h
index 75347b48..bf2b254 100644
--- a/ui/accelerated_widget_mac/io_surface_context.h
+++ b/ui/accelerated_widget_mac/io_surface_context.h
@@ -13,6 +13,7 @@
#include "base/mac/scoped_nsobject.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "ui/accelerated_widget_mac/accelerated_widget_mac_export.h"
#include "ui/gl/gpu_switching_observer.h"
#include "ui/gl/scoped_cgl.h"
@@ -33,7 +34,8 @@ class IOSurfaceContext
// Get or create a GL context of the specified type. Share these GL contexts
// as much as possible because creating and destroying them can be expensive.
// http://crbug.com/180463
- static scoped_refptr<IOSurfaceContext> Get(Type type);
+ ACCELERATED_WIDGET_MAC_EXPORT static scoped_refptr<IOSurfaceContext> Get(
+ Type type);
// Mark that all the GL contexts in the same sharegroup as this context as
// invalid, so they shouldn't be returned anymore by Get, but rather, new