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

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

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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/generate_bindings.py ('k') | ui/gl/gl_bindings.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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/gl/gl_context.h" 12 #include "ui/gl/gl_context.h"
13 #include "ui/gl/gl_gl_api_implementation.h" 13 #include "ui/gl/gl_gl_api_implementation.h"
14 #include "ui/gl/gl_implementation.h" 14 #include "ui/gl/gl_implementation.h"
15 #include "ui/gl/gl_switches.h" 15 #include "ui/gl/gl_switches.h"
16 #include "ui/gl/gpu_timing.h" 16 #include "ui/gl/gpu_timing.h"
17 17
18 namespace gfx { 18 namespace gl {
19 19
20 class GLContextFake : public GLContext { 20 class GLContextFake : public GLContext {
21 public: 21 public:
22 bool Initialize(GLSurface* compatible_surface, 22 bool Initialize(GLSurface* compatible_surface,
23 GpuPreference gpu_preference) override { 23 GpuPreference gpu_preference) override {
24 return true; 24 return true;
25 } 25 }
26 bool MakeCurrent(GLSurface* surface) override { return true; } 26 bool MakeCurrent(GLSurface* surface) override { return true; }
27 void ReleaseCurrent(GLSurface* surface) override {} 27 void ReleaseCurrent(GLSurface* surface) override {}
28 bool IsCurrent(GLSurface* surface) override { return true; } 28 bool IsCurrent(GLSurface* surface) override { return true; }
29 void* GetHandle() override { return NULL; } 29 void* GetHandle() override { return NULL; }
30 scoped_refptr<gfx::GPUTimingClient> CreateGPUTimingClient() override { 30 scoped_refptr<gl::GPUTimingClient> CreateGPUTimingClient() override {
31 return NULL; 31 return NULL;
32 } 32 }
33 void OnSetSwapInterval(int interval) override {} 33 void OnSetSwapInterval(int interval) override {}
34 GLContextFake() : GLContext(NULL) {} 34 GLContextFake() : GLContext(NULL) {}
35 protected: 35 protected:
36 ~GLContextFake() override {} 36 ~GLContextFake() override {}
37 }; 37 };
38 38
39 class GLApiTest : public testing::Test { 39 class GLApiTest : public testing::Test {
40 public: 40 public:
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 command_line.AppendSwitchASCII(switches::kDisableGLExtensions, 210 command_line.AppendSwitchASCII(switches::kDisableGLExtensions,
211 kFakeDisabledExtensions); 211 kFakeDisabledExtensions);
212 InitializeAPI(&command_line); 212 InitializeAPI(&command_line);
213 213
214 EXPECT_EQ(arraysize(kFilteredExtensions), GetNumExtensions()); 214 EXPECT_EQ(arraysize(kFilteredExtensions), GetNumExtensions());
215 for (uint32_t i = 0; i < arraysize(kFilteredExtensions); ++i) { 215 for (uint32_t i = 0; i < arraysize(kFilteredExtensions); ++i) {
216 EXPECT_STREQ(kFilteredExtensions[i], GetExtensioni(i)); 216 EXPECT_STREQ(kFilteredExtensions[i], GetExtensioni(i));
217 } 217 }
218 } 218 }
219 219
220 } // namespace gfx 220 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/generate_bindings.py ('k') | ui/gl/gl_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698