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

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

Issue 2897263003: Fix Omnibox.CharTypedToRepaintLatency regression with D3DVsync experiment (Closed)
Patch Set: Address the test flakiness 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: 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..eb3186a33ce18526e4241e78d3bc83bb14b1226e 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,
+ cc::ExternalBeginFrameSourceClient {
sunnyps 2017/05/30 22:13:17 nit: public cc::ExternalBeginFrameSourceClient
stanisc 2017/05/31 01:17:53 This inheritance doesn't need to be public because
sunnyps 2017/05/31 01:26:02 google style guide prohibits private inheritance:
stanisc 2017/05/31 17:33:12 Thanks to pointing out to that! Done.
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:
+ bool GetMissedBeginFrameArgs(cc::BeginFrameObserver* obs,
+ cc::BeginFrameArgs* missed_args) override;
+
GpuVSyncControl* const vsync_control_;
bool needs_begin_frames_;
uint64_t next_sequence_number_;

Powered by Google App Engine
This is Rietveld 408576698