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

Unified Diff: content/browser/compositor/gpu_vsync_begin_frame_source.h

Issue 2897263003: Fix Omnibox.CharTypedToRepaintLatency regression with D3DVsync experiment (Closed)
Patch Set: Addressed feedback 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
« no previous file with comments | « cc/scheduler/begin_frame_source.cc ('k') | content/browser/compositor/gpu_vsync_begin_frame_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « cc/scheduler/begin_frame_source.cc ('k') | content/browser/compositor/gpu_vsync_begin_frame_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698