OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_GL_ANGLE_PLATFORM_IMPL_H_ | 5 #ifndef UI_GL_ANGLE_PLATFORM_IMPL_H_ |
6 #define UI_GL_ANGLE_PLATFORM_IMPL_H_ | 6 #define UI_GL_ANGLE_PLATFORM_IMPL_H_ |
7 | 7 |
8 // Implements the ANGLE platform interface, for functionality like | 8 // Implements the ANGLE platform interface, for functionality like |
9 // histograms and trace profiling. | 9 // histograms and trace profiling. |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "third_party/angle/include/platform/Platform.h" | 12 #include "third_party/angle/include/platform/Platform.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 | 15 |
16 // Derives the base ANGLE platform and provides implementations | 16 // Derives the base ANGLE platform and provides implementations |
17 class ANGLEPlatformImpl : public angle::Platform { | 17 class ANGLEPlatformImpl : public angle::Platform { |
18 public: | 18 public: |
19 ANGLEPlatformImpl(); | 19 ANGLEPlatformImpl(); |
20 ~ANGLEPlatformImpl() override; | 20 ~ANGLEPlatformImpl() override; |
21 | 21 |
22 // angle::Platform: | 22 // angle::Platform: |
| 23 double monotonicallyIncreasingTime() override; |
| 24 const unsigned char* getTraceCategoryEnabledFlag( |
| 25 const char* category_group) override; |
| 26 TraceEventHandle addTraceEvent(char phase, |
| 27 const unsigned char* category_group_enabled, |
| 28 const char* name, |
| 29 unsigned long long id, |
| 30 double timestamp, |
| 31 int num_args, |
| 32 const char** arg_names, |
| 33 const unsigned char* arg_types, |
| 34 const unsigned long long* arg_values, |
| 35 unsigned char flags) override; |
| 36 void updateTraceEventDuration(const unsigned char* category_group_enabled, |
| 37 const char* name, |
| 38 TraceEventHandle handle) override; |
23 void histogramCustomCounts(const char* name, | 39 void histogramCustomCounts(const char* name, |
24 int sample, | 40 int sample, |
25 int min, | 41 int min, |
26 int max, | 42 int max, |
27 int bucket_count) override; | 43 int bucket_count) override; |
28 void histogramEnumeration(const char* name, | 44 void histogramEnumeration(const char* name, |
29 int sample, | 45 int sample, |
30 int boundary_value) override; | 46 int boundary_value) override; |
31 void histogramSparse(const char* name, int sample) override; | 47 void histogramSparse(const char* name, int sample) override; |
32 | 48 |
33 private: | 49 private: |
34 DISALLOW_COPY_AND_ASSIGN(ANGLEPlatformImpl); | 50 DISALLOW_COPY_AND_ASSIGN(ANGLEPlatformImpl); |
35 }; | 51 }; |
36 | 52 |
37 } // namespace gfx | 53 } // namespace gfx |
38 | 54 |
39 #endif // UI_GL_ANGLE_PLATFORM_IMPL_H_ | 55 #endif // UI_GL_ANGLE_PLATFORM_IMPL_H_ |
OLD | NEW |