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

Unified Diff: content/common/gpu/image_transport_surface_overlay_mac.h

Issue 1271123002: Mac: Enable partial swap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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: content/common/gpu/image_transport_surface_overlay_mac.h
diff --git a/content/common/gpu/image_transport_surface_overlay_mac.h b/content/common/gpu/image_transport_surface_overlay_mac.h
index e4822db21f8e6f7fe35aa1196776cdaf7901e833..62913a096692b2b7001dcb2fbaf202ed521ecbff 100644
--- a/content/common/gpu/image_transport_surface_overlay_mac.h
+++ b/content/common/gpu/image_transport_surface_overlay_mac.h
@@ -65,6 +65,10 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
// The size of the full frame, in dip.
gfx::Size dip_size;
+
+ // If true, the partial damage rect for the frame.
+ bool use_partial_damage;
+ gfx::Rect dip_partial_damage_rect;
};
~ImageTransportSurfaceOverlayMac() override;
@@ -82,6 +86,7 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
scoped_ptr<ImageTransportHelper> helper_;
base::scoped_nsobject<CAContext> ca_context_;
base::scoped_nsobject<CALayer> layer_;
+ base::scoped_nsobject<CALayer> partial_damage_layer_;
gfx::Size pixel_size_;
float scale_factor_;
@@ -96,6 +101,10 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
// have not yet been displayed by CheckAndDisplayPendingSwaps.
std::deque<PendingSwap> pending_swaps_;
+ // The union of the damage rects of SwapBuffersInternal since the last
+ // non-partial swap.
+ gfx::Rect accumulated_partial_damage_pixel_rect_;
+
// The display link used to compute the delay for the posted task in
// PostCheckAndDisplayPendingSwaps.
scoped_refptr<ui::DisplayLinkMac> display_link_mac_;

Powered by Google App Engine
This is Rietveld 408576698