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

Unified Diff: ui/accelerated_widget_mac/io_surface_texture.h

Issue 1161853006: Mac: Add partial swap support to NSOpenGLContext path (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 5 years, 6 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/accelerated_widget_mac/io_surface_texture.h
diff --git a/ui/accelerated_widget_mac/io_surface_texture.h b/ui/accelerated_widget_mac/io_surface_texture.h
index 473e69cb4a37475ca67d03a6a684c322b661e263..2cdd235aa1850eaeda7a1aae949e5a80f5523382 100644
--- a/ui/accelerated_widget_mac/io_surface_texture.h
+++ b/ui/accelerated_widget_mac/io_surface_texture.h
@@ -40,7 +40,6 @@ class RenderWidgetHostViewMac;
class IOSurfaceTexture
: public base::RefCounted<IOSurfaceTexture> {
public:
- // Returns NULL if IOSurfaceTexture or GL API calls fail.
static scoped_refptr<IOSurfaceTexture> Create(
bool needs_gl_finish_workaround);
@@ -54,6 +53,7 @@ class IOSurfaceTexture
// larger than the IOSurface, the remaining right and bottom edges will be
// white. |window_scale_factor| is 1 in normal views, 2 in HiDPI views.
bool DrawIOSurface() WARN_UNUSED_RESULT;
+ bool DrawIOSurfaceWithDamageRect(gfx::Rect damage_rect) WARN_UNUSED_RESULT;
// Returns true if the offscreen context used by this surface has been
// poisoned.
@@ -67,6 +67,10 @@ class IOSurfaceTexture
bool needs_gl_finish_workaround);
~IOSurfaceTexture();
+ // Draw the sepecified rect of the IOSurface. If |draw_boundary| is true,
+ // clear any overflow regions with white.
+ bool DrawIOSurfaceInternal(gfx::Rect damage_rect, bool draw_boundary);
+
// Unref the IOSurfaceTexture and delete the associated GL texture. If the GPU
// process is no longer referencing it, this will delete the IOSurface.
void ReleaseIOSurfaceAndTexture();
« no previous file with comments | « ui/accelerated_widget_mac/io_surface_ns_gl_surface.mm ('k') | ui/accelerated_widget_mac/io_surface_texture.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698