Index: content/browser/compositor/gpu_vsync_begin_frame_source.h |
diff --git a/content/browser/compositor/gpu_vsync_begin_frame_source.h b/content/browser/compositor/gpu_vsync_begin_frame_source.h |
index a3ddd6b07863833b9d5bb2b267355db53dd4ed59..9df2f07d94010cd449ad5825f29b1936e2f952f7 100644 |
--- a/content/browser/compositor/gpu_vsync_begin_frame_source.h |
+++ b/content/browser/compositor/gpu_vsync_begin_frame_source.h |
@@ -8,19 +8,21 @@ |
#include "base/memory/weak_ptr.h" |
#include "base/time/time.h" |
#include "cc/scheduler/begin_frame_source.h" |
+#include "content/common/content_export.h" |
namespace content { |
// This class is used to control VSync production on GPU side. |
-class GpuVSyncControl { |
+class CONTENT_EXPORT GpuVSyncControl { |
public: |
virtual void SetNeedsVSync(bool needs_vsync) = 0; |
}; |
// This is a type of ExternalBeginFrameSource where VSync signals are |
// generated externally on GPU side. |
-class GpuVSyncBeginFrameSource : public cc::ExternalBeginFrameSource, |
- cc::ExternalBeginFrameSourceClient { |
+class CONTENT_EXPORT GpuVSyncBeginFrameSource |
+ : public cc::ExternalBeginFrameSource, |
+ public cc::ExternalBeginFrameSourceClient { |
public: |
explicit GpuVSyncBeginFrameSource(GpuVSyncControl* vsync_control); |
~GpuVSyncBeginFrameSource() override; |
@@ -30,7 +32,14 @@ class GpuVSyncBeginFrameSource : public cc::ExternalBeginFrameSource, |
void OnVSync(base::TimeTicks timestamp, base::TimeDelta interval); |
+ protected: |
+ // Virtual for testing. |
+ virtual base::TimeTicks Now() const; |
+ |
private: |
+ cc::BeginFrameArgs GetMissedBeginFrameArgs( |
+ cc::BeginFrameObserver* obs) override; |
+ |
GpuVSyncControl* const vsync_control_; |
bool needs_begin_frames_; |
uint64_t next_sequence_number_; |