| 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/compiler_specific.h" | 11 #include "ui/gl/gl_context_egl.h" |
| 12 #include "base/macros.h" | |
| 13 #include "third_party/angle/include/platform/Platform.h" | |
| 14 #include "ui/gl/gl_export.h" | |
| 15 | 12 |
| 16 namespace gl { | 13 namespace gl { |
| 17 | 14 |
| 18 // Derives the base ANGLE platform and provides implementations | 15 bool InitializeANGLEPlatform(EGLDisplay display); |
| 19 class GL_EXPORT ANGLEPlatformImpl : NON_EXPORTED_BASE(public angle::Platform) { | 16 void ResetANGLEPlatform(EGLDisplay display); |
| 20 public: | |
| 21 ANGLEPlatformImpl(); | |
| 22 ~ANGLEPlatformImpl() override; | |
| 23 | |
| 24 // angle::Platform: | |
| 25 double currentTime() override; | |
| 26 double monotonicallyIncreasingTime() override; | |
| 27 void logError(const char* errorMessage) override; | |
| 28 void logWarning(const char* warningMessage) override; | |
| 29 const unsigned char* getTraceCategoryEnabledFlag( | |
| 30 const char* category_group) override; | |
| 31 TraceEventHandle addTraceEvent(char phase, | |
| 32 const unsigned char* category_group_enabled, | |
| 33 const char* name, | |
| 34 unsigned long long id, | |
| 35 double timestamp, | |
| 36 int num_args, | |
| 37 const char** arg_names, | |
| 38 const unsigned char* arg_types, | |
| 39 const unsigned long long* arg_values, | |
| 40 unsigned char flags) override; | |
| 41 void updateTraceEventDuration(const unsigned char* category_group_enabled, | |
| 42 const char* name, | |
| 43 TraceEventHandle handle) override; | |
| 44 void histogramCustomCounts(const char* name, | |
| 45 int sample, | |
| 46 int min, | |
| 47 int max, | |
| 48 int bucket_count) override; | |
| 49 void histogramEnumeration(const char* name, | |
| 50 int sample, | |
| 51 int boundary_value) override; | |
| 52 void histogramSparse(const char* name, int sample) override; | |
| 53 void histogramBoolean(const char* name, bool sample) override; | |
| 54 | |
| 55 private: | |
| 56 DISALLOW_COPY_AND_ASSIGN(ANGLEPlatformImpl); | |
| 57 }; | |
| 58 | 17 |
| 59 } // namespace gl | 18 } // namespace gl |
| 60 | 19 |
| 61 #endif // UI_GL_ANGLE_PLATFORM_IMPL_H_ | 20 #endif // UI_GL_ANGLE_PLATFORM_IMPL_H_ |
| OLD | NEW |