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

Side by Side Diff: ui/gl/gpu_timing.h

Issue 1135943002: Pull in various gpu/command_buffer fixes from chromium (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « ui/gl/gl_version_info.h ('k') | ui/gl/gpu_timing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_GPU_TIMING_H_ 5 #ifndef UI_GL_GPU_TIMING_H_
6 #define UI_GL_GPU_TIMING_H_ 6 #define UI_GL_GPU_TIMING_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gl/gl_export.h" 10 #include "ui/gl/gl_export.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 uint32_t disjoint_counter_ = 0; 69 uint32_t disjoint_counter_ = 0;
70 DISALLOW_COPY_AND_ASSIGN(GPUTiming); 70 DISALLOW_COPY_AND_ASSIGN(GPUTiming);
71 }; 71 };
72 72
73 // Class to compute the amount of time it takes to fully 73 // Class to compute the amount of time it takes to fully
74 // complete a set of GL commands 74 // complete a set of GL commands
75 class GL_EXPORT GPUTimer { 75 class GL_EXPORT GPUTimer {
76 public: 76 public:
77 ~GPUTimer(); 77 ~GPUTimer();
78 78
79 // Destroy the timer object. This must be explicitly called before destroying
80 // this object.
81 void Destroy(bool have_context);
82
79 void Start(); 83 void Start();
80 void End(); 84 void End();
81 bool IsAvailable(); 85 bool IsAvailable();
82 86
83 void GetStartEndTimestamps(int64* start, int64* end); 87 void GetStartEndTimestamps(int64* start, int64* end);
84 int64 GetDeltaElapsed(); 88 int64 GetDeltaElapsed();
85 89
86 private: 90 private:
87 friend class GPUTimingClient; 91 friend class GPUTimingClient;
88 92
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 uint32_t disjoint_counter_ = 0; 139 uint32_t disjoint_counter_ = 0;
136 bool offset_valid_ = false; 140 bool offset_valid_ = false;
137 base::Callback<int64(void)> cpu_time_for_testing_; 141 base::Callback<int64(void)> cpu_time_for_testing_;
138 142
139 DISALLOW_COPY_AND_ASSIGN(GPUTimingClient); 143 DISALLOW_COPY_AND_ASSIGN(GPUTimingClient);
140 }; 144 };
141 145
142 } // namespace gfx 146 } // namespace gfx
143 147
144 #endif // UI_GL_GPU_TIMING_H_ 148 #endif // UI_GL_GPU_TIMING_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_version_info.h ('k') | ui/gl/gpu_timing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698