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

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

Issue 1661453003: Mac overlays: Clean up partial swap code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 11 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 5b86a5e987696f516bb264d85d77097b6c19f4f1..2103bbf71089ecdeebb46aac7ede333f834e1b33 100644
--- a/content/common/gpu/image_transport_surface_overlay_mac.h
+++ b/content/common/gpu/image_transport_surface_overlay_mac.h
@@ -8,7 +8,6 @@
#include <list>
#include <vector>
-#include "base/memory/linked_ptr.h"
#import "base/mac/scoped_nsobject.h"
#include "base/timer/timer.h"
#include "content/common/gpu/gpu_command_buffer_stub.h"
@@ -22,6 +21,7 @@
namespace content {
class CALayerTree;
+class CALayerPartialDamageTree;
class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
public ImageTransportSurface,
@@ -78,13 +78,6 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
gfx::SwapResult SwapBuffersInternal(const gfx::Rect& pixel_damage_rect);
- void UpdateRootAndPartialDamagePlanes(
- const linked_ptr<OverlayPlane>& new_root_plane,
- const gfx::RectF& pixel_damage_rect);
- void UpdateRootAndPartialDamageCALayers(float scale_factor);
- void UpdateCALayerTree(scoped_ptr<CALayerTree> ca_layer_tree,
- float scale_factor);
-
// Returns true if the front of |pending_swaps_| has completed, or has timed
// out by |now|.
bool IsFirstPendingSwapReadyToDisplay(
@@ -125,7 +118,7 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
// Planes that have been scheduled, but have not had a subsequent SwapBuffers
// call made yet.
- linked_ptr<OverlayPlane> pending_root_plane_;
+ scoped_ptr<CALayerPartialDamageTree> pending_partial_damage_tree_;
scoped_ptr<CALayerTree> pending_ca_layer_tree_;
// A queue of all frames that have been created by SwapBuffersInternal but
@@ -134,8 +127,7 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
std::deque<linked_ptr<PendingSwap>> pending_swaps_;
// The planes that are currently being displayed on the screen.
- linked_ptr<OverlayPlane> current_root_plane_;
- std::list<linked_ptr<OverlayPlane>> current_partial_damage_planes_;
+ scoped_ptr<CALayerPartialDamageTree> current_partial_damage_tree_;
scoped_ptr<CALayerTree> current_ca_layer_tree_;
// The time of the last swap was issued. If this is more than two vsyncs, then
@@ -147,10 +139,6 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
base::TimeTicks vsync_timebase_;
base::TimeDelta vsync_interval_;
- // Calls to ScheduleCALayer come in back-to-front. This is reset to 1 at each
- // swap and increments with each call to ScheduleCALayer.
- int next_ca_layer_z_order_;
-
base::Timer display_pending_swap_timer_;
base::WeakPtrFactory<ImageTransportSurfaceOverlayMac> weak_factory_;
};
« no previous file with comments | « content/common/gpu/ca_layer_partial_damage_tree_mac.mm ('k') | content/common/gpu/image_transport_surface_overlay_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698