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

Unified Diff: ui/gl/gl_surface_egl.h

Issue 1486773002: Add NativeViewGLSurfaceEGL::CommitOverlayPlanes support for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cop-bare-implementation
Patch Set: Move comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_egl.h
diff --git a/ui/gl/gl_surface_egl.h b/ui/gl/gl_surface_egl.h
index 8fb84a08003fedf5ef6cc01be500e5b8e406524b..9f8a3fa87101e58d2292d700b831e28a30227373 100644
--- a/ui/gl/gl_surface_egl.h
+++ b/ui/gl/gl_surface_egl.h
@@ -18,6 +18,7 @@
#include "ui/gfx/vsync_provider.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_surface.h"
+#include "ui/gl/gl_surface_overlay.h"
namespace gfx {
@@ -87,6 +88,8 @@ class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL {
EGLSurface GetHandle() override;
bool SupportsPostSubBuffer() override;
gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
+ bool SupportsCommitOverlayPlanes() override;
+ gfx::SwapResult CommitOverlayPlanes() override;
VSyncProvider* GetVSyncProvider() override;
bool ScheduleOverlayPlane(int z_order,
OverlayTransform transform,
@@ -106,6 +109,10 @@ class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL {
void OnSetSwapInterval(int interval) override;
private:
+ // Commit the |pending_overlays_| and clear the vector. Returns false if any
+ // fail to be committed.
+ bool CommitAndClearPendingOverlays();
+
EGLSurface surface_;
bool supports_post_sub_buffer_;
EGLConfig config_;
@@ -115,6 +122,8 @@ class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL {
int swap_interval_;
+ std::vector<GLSurfaceOverlay> pending_overlays_;
+
#if defined(OS_WIN)
bool vsync_override_;
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698