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

Side by Side Diff: ui/gl/gpu_timing_unittest.cc

Issue 2543313002: ui/gl: rename ClearGLBindings to ShutdownGL (Closed)
Patch Set: Created 4 years 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_wgl_api_implementation.cc ('k') | ui/gl/init/gl_factory.h » ('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 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 #include "ui/gl/gpu_timing.h" 5 #include "ui/gl/gpu_timing.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 21 matching lines...) Expand all
32 void SetUp() override { 32 void SetUp() override {
33 setup_ = false; 33 setup_ = false;
34 cpu_time_bounded_ = false; 34 cpu_time_bounded_ = false;
35 } 35 }
36 36
37 void TearDown() override { 37 void TearDown() override {
38 context_ = nullptr; 38 context_ = nullptr;
39 surface_ = nullptr; 39 surface_ = nullptr;
40 if (setup_) { 40 if (setup_) {
41 MockGLInterface::SetGLInterface(NULL); 41 MockGLInterface::SetGLInterface(NULL);
42 init::ClearGLBindings(); 42 init::ShutdownGL();
43 } 43 }
44 setup_ = false; 44 setup_ = false;
45 cpu_time_bounded_ = false; 45 cpu_time_bounded_ = false;
46 gl_.reset(); 46 gl_.reset();
47 gpu_timing_fake_queries_.Reset(); 47 gpu_timing_fake_queries_.Reset();
48 } 48 }
49 49
50 void SetupGLContext(const char* gl_version, const char* gl_extensions) { 50 void SetupGLContext(const char* gl_version, const char* gl_extensions) {
51 ASSERT_FALSE(setup_) << "Cannot setup GL context twice."; 51 ASSERT_FALSE(setup_) << "Cannot setup GL context twice.";
52 SetGLGetProcAddressProc(MockGLInterface::GetGLProcAddress); 52 SetGLGetProcAddressProc(MockGLInterface::GetGLProcAddress);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 int64_t start, end; 209 int64_t start, end;
210 gpu_timer->GetStartEndTimestamps(&start, &end); 210 gpu_timer->GetStartEndTimestamps(&start, &end);
211 // Force time elapsed won't be set until a query is actually attempted 211 // Force time elapsed won't be set until a query is actually attempted
212 ASSERT_TRUE(client->IsForceTimeElapsedQuery()); 212 ASSERT_TRUE(client->IsForceTimeElapsedQuery());
213 EXPECT_EQ(begin_cpu_time, start); 213 EXPECT_EQ(begin_cpu_time, start);
214 EXPECT_EQ(begin_cpu_time, end); 214 EXPECT_EQ(begin_cpu_time, end);
215 } 215 }
216 216
217 } // namespace gl 217 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_wgl_api_implementation.cc ('k') | ui/gl/init/gl_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698