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

Unified Diff: cc/surfaces/surface.h

Issue 2854163003: [cc] Plumb BeginFrameAcks through SurfaceManager to DisplayScheduler. (Closed)
Patch Set: track state in DisplayScheduler rather than Surface Created 3 years, 7 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: cc/surfaces/surface.h
diff --git a/cc/surfaces/surface.h b/cc/surfaces/surface.h
index 2e0996821ec35630b863bf340b78a4146c369029..338622d6bb91f408a0fa6857d1d4010ed1b5b2f8 100644
--- a/cc/surfaces/surface.h
+++ b/cc/surfaces/surface.h
@@ -18,8 +18,8 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/optional.h"
+#include "cc/output/compositor_frame.h"
#include "cc/output/copy_output_request.h"
-#include "cc/surfaces/compositor_frame_sink_support.h"
#include "cc/surfaces/frame_sink_id.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surface_sequence.h"
@@ -32,8 +32,9 @@ class LatencyInfo;
namespace cc {
-class CompositorFrame;
+class CompositorFrameSinkSupport;
class CopyOutputRequest;
+class SurfaceManager;
class CC_SURFACES_EXPORT Surface {
public:
@@ -119,6 +120,10 @@ class CC_SURFACES_EXPORT Surface {
bool HasActiveFrame() const { return active_frame_data_.has_value(); }
bool HasPendingFrame() const { return pending_frame_data_.has_value(); }
+ bool HasUndrawnFrame() const {
+ return HasPendingFrame() ||
+ (HasActiveFrame() && active_frame_data_->draw_callback);
+ }
bool destroyed() const { return destroyed_; }
void set_destroyed(bool destroyed) { destroyed_ = destroyed; }

Powered by Google App Engine
This is Rietveld 408576698