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

Unified Diff: ui/gl/gl_surface.h

Issue 2302393002: Support swap damage rect using eglSwapBuffersWithDamageKHR (Closed)
Patch Set: Added new SwapBuffersWithDamage entry point Created 4 years, 3 months 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
Index: ui/gl/gl_surface.h
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
index ba990f0a66bc376377487bea7907b925645e4273..1b9ffa089ea102d98a11f650e461d07886745b86 100644
--- a/ui/gl/gl_surface.h
+++ b/ui/gl/gl_surface.h
@@ -85,6 +85,9 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
// Get the underlying platform specific surface "handle".
virtual void* GetHandle() = 0;
+ // Returns whether or not the surface supports SwapBuffersWithDamage
+ virtual bool SupportsSwapBuffersWithDamage();
+
// Returns whether or not the surface supports PostSubBuffer.
virtual bool SupportsPostSubBuffer();
@@ -106,6 +109,12 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
// the calling thread (i.e. same thread SwapBuffersAsync is called)
virtual void SwapBuffersAsync(const SwapCompletionCallback& callback);
+ // Swap buffers with damage rect.
+ virtual gfx::SwapResult SwapBuffersWithDamage(int x,
+ int y,
+ int width,
+ int height);
+
// Copy part of the backbuffer to the frontbuffer.
virtual gfx::SwapResult PostSubBuffer(int x, int y, int width, int height);

Powered by Google App Engine
This is Rietveld 408576698