diff options
Diffstat (limited to 'libhwc2.1/libdrmresource/include/vsyncworker.h')
-rw-r--r-- | libhwc2.1/libdrmresource/include/vsyncworker.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/libhwc2.1/libdrmresource/include/vsyncworker.h b/libhwc2.1/libdrmresource/include/vsyncworker.h index ce12eea..7e9c124 100644 --- a/libhwc2.1/libdrmresource/include/vsyncworker.h +++ b/libhwc2.1/libdrmresource/include/vsyncworker.h @@ -30,41 +30,41 @@ namespace android { class VsyncCallback { - public: - virtual ~VsyncCallback() {} - virtual void Callback(int display, int64_t timestamp) = 0; + public: + virtual ~VsyncCallback() {} + virtual void Callback(int display, int64_t timestamp) = 0; }; class VSyncWorker : public Worker { - public: - VSyncWorker(); - ~VSyncWorker() override; + public: + VSyncWorker(); + ~VSyncWorker() override; - int Init(DrmDevice *drm, int display, const String8 &display_trace_name); - void RegisterCallback(std::shared_ptr<VsyncCallback> callback); + int Init(DrmDevice* drm, int display, const String8& displayTraceName); + void RegisterCallback(std::shared_ptr<VsyncCallback> callback); - void VSyncControl(bool enabled); + void VSyncControl(bool enabled); - protected: - void Routine() override; + protected: + void Routine() override; - private: - int GetPhasedVSync(int64_t frame_ns, int64_t &expect); - int SyntheticWaitVBlank(int64_t ×tamp); + private: + int GetPhasedVSync(uint32_t vsyncPeriodNs, int64_t& expectTimeNs); + int SyntheticWaitVBlank(int64_t& timestamp); - DrmDevice *drm_; + DrmDevice* mDrmDevice; - // shared_ptr since we need to use this outside of the thread lock (to - // actually call the hook) and we don't want the memory freed until we're - // done - std::shared_ptr<VsyncCallback> callback_ = NULL; + // shared_ptr since we need to use this outside of the thread lock (to + // actually call the hook) and we don't want the memory freed until we're + // done + std::shared_ptr<VsyncCallback> mCallback = NULL; - int display_; - std::atomic_bool enabled_; - int64_t last_timestamp_; - String8 hw_vsync_period_tag_; - String8 hw_vsync_enabled_tag_; - String8 display_trace_name_; + int mDisplay; + std::atomic_bool mEnabled; + int64_t mLastTimestampNs; + String8 mHwVsyncPeriodTag; + String8 mHwVsyncEnabledTag; + String8 mDisplayTraceName; }; } // namespace android |