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

Unified Diff: cc/output/output_surface.h

Issue 560123002: cc:: Add LatencyQuery logic back into OutputSurface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | cc/output/output_surface.cc » ('j') | cc/output/output_surface.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.h
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index 42498c8451e12594d0d8e377cacfefd9456b9b06..d3eca54fa83d98023e0c71e623785a5fd8422d8c 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -12,6 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "cc/base/cc_export.h"
+#include "cc/base/rolling_time_delta_history.h"
#include "cc/output/context_provider.h"
#include "cc/output/overlay_candidate_validator.h"
#include "cc/output/software_output_device.h"
@@ -127,6 +128,10 @@ class CC_EXPORT OutputSurface {
bool HasClient() { return !!client_; }
+ // Returns an estimate of the current GPU latency. When only a software
+ // device is present, returns 0.
+ base::TimeDelta GpuLatencyEstimate();
+
// Get the class capable of informing cc of hardware overlay capability.
OverlayCandidateValidator* overlay_candidate_validator() const {
return overlay_candidate_validator_.get();
@@ -169,11 +174,16 @@ class CC_EXPORT OutputSurface {
void SetUpContext3d();
void ResetContext3d();
void SetMemoryPolicy(const ManagedMemoryPolicy& policy);
+ void UpdateAndMeasureGpuLatency();
bool external_stencil_test_enabled_;
base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
+ std::deque<unsigned> available_gpu_latency_query_ids_;
+ std::deque<unsigned> pending_gpu_latency_query_ids_;
+ RollingTimeDeltaHistory gpu_latency_history_;
+
DISALLOW_COPY_AND_ASSIGN(OutputSurface);
};
« no previous file with comments | « no previous file | cc/output/output_surface.cc » ('j') | cc/output/output_surface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698