aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrTypesPriv.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu/GrTypesPriv.h')
-rw-r--r--include/gpu/GrTypesPriv.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h
index 28c33350eb..5db1c24765 100644
--- a/include/gpu/GrTypesPriv.h
+++ b/include/gpu/GrTypesPriv.h
@@ -8,9 +8,19 @@
#ifndef GrTypesPriv_DEFINED
#define GrTypesPriv_DEFINED
+#include <chrono>
#include "GrTypes.h"
#include "SkRefCnt.h"
+// The old libstdc++ uses the draft name "monotonic_clock" rather than "steady_clock". This might
+// not actually be monotonic, depending on how libstdc++ was built. However, this is only currently
+// used for idle resource purging so it shouldn't cause a correctness problem.
+#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20130000)
+using GrStdSteadyClock = std::chrono::monotonic_clock;
+#else
+using GrStdSteadyClock = std::chrono::steady_clock;
+#endif
+
/** This enum indicates the type of antialiasing to be performed. */
enum class GrAAType : unsigned {
/** No antialiasing */