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

Unified Diff: gpu/ipc/service/image_transport_surface_overlay_mac.h

Issue 1867163002: Mac: Clean up ImageTransportSurfaceOverlayMac timing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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
« no previous file with comments | « no previous file | gpu/ipc/service/image_transport_surface_overlay_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/image_transport_surface_overlay_mac.h
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h
index dde6109abaf8d5fc9f6081496802da90fc62354a..e455cf004167d2d7f5a31f57ce8c82f0881d3603 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.h
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h
@@ -45,7 +45,6 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
gfx::Size GetSize() override;
void* GetHandle() override;
bool OnMakeCurrent(gfx::GLContext* context) override;
- bool SetBackbufferAllocation(bool allocated) override;
bool ScheduleOverlayPlane(int z_order,
gfx::OverlayTransform transform,
gl::GLImage* image,
@@ -67,9 +66,6 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
void OnGpuSwitched() override;
private:
- class PendingSwap;
- class OverlayPlane;
-
~ImageTransportSurfaceOverlayMac() override;
void SetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info);
@@ -85,31 +81,6 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
std::vector<ui::LatencyInfo> latency_info);
gfx::SwapResult SwapBuffersInternal(const gfx::Rect& pixel_damage_rect);
- // Returns true if the front of |pending_swaps_| has completed, or has timed
- // out by |now|.
- bool IsFirstPendingSwapReadyToDisplay(
- const base::TimeTicks& now);
- // Sets the CALayer contents to the IOSurface for the front of
- // |pending_swaps_|, and removes it from the queue.
- void DisplayFirstPendingSwapImmediately();
- // Force that all of |pending_swaps_| displayed immediately, and the list be
- // cleared.
- void DisplayAndClearAllPendingSwaps();
- // Callback issued during the next vsync period ofter a SwapBuffers call,
- // to check if the swap is completed, and display the frame. Note that if
- // another SwapBuffers happens before this callback, the pending swap will
- // be tested at that time, too.
- void CheckPendingSwapsCallback();
- // Function to post the above callback. The argument |now| is passed as an
- // argument to avoid redundant calls to base::TimeTicks::Now.
- void PostCheckPendingSwapsCallbackIfNeeded(const base::TimeTicks& now);
-
- // Return the time of |interval_fraction| of the way through the next
- // vsync period that starts after |from|. If the vsync parameters are not
- // valid then return |from|.
- base::TimeTicks GetNextVSyncTimeAfter(
- const base::TimeTicks& from, double interval_fraction);
-
GpuChannelManager* manager_;
base::WeakPtr<GpuCommandBufferStub> stub_;
SurfaceHandle handle_;
@@ -131,26 +102,14 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface,
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
- // have not yet been displayed. This queue is checked at the beginning of
- // every swap and also by a callback.
- std::deque<linked_ptr<PendingSwap>> pending_swaps_;
-
// The planes that are currently being displayed on the screen.
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
- // use the simpler non-smooth animation path.
- base::TimeTicks last_swap_time_;
-
// The vsync information provided by the browser.
bool vsync_parameters_valid_;
base::TimeTicks vsync_timebase_;
base::TimeDelta vsync_interval_;
-
- base::Timer display_pending_swap_timer_;
- base::WeakPtrFactory<ImageTransportSurfaceOverlayMac> weak_factory_;
};
} // namespace gpu
« no previous file with comments | « no previous file | gpu/ipc/service/image_transport_surface_overlay_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698