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

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

Issue 1930633002: Fix gpu_ipc_service_unittests on mac_chromium_rel_ng by managing GL shared groups the same way in s… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/gl_context_ozone.cc ('k') | ui/gl/gl_context_stub.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GL_CONTEXT_STUB_H_ 5 #ifndef UI_GL_GL_CONTEXT_STUB_H_
6 #define UI_GL_GL_CONTEXT_STUB_H_ 6 #define UI_GL_GL_CONTEXT_STUB_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gl/gl_context.h" 9 #include "ui/gl/gl_context.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 12
13 class GLShareGroup;
14
13 // A GLContext that does nothing for unit tests. 15 // A GLContext that does nothing for unit tests.
14 class GL_EXPORT GLContextStub : public GLContextReal { 16 class GL_EXPORT GLContextStub : public GLContextReal {
15 public: 17 public:
16 GLContextStub(); 18 GLContextStub();
19 explicit GLContextStub(GLShareGroup* share_group);
17 20
18 // Implement GLContext. 21 // Implement GLContext.
19 bool Initialize(GLSurface* compatible_surface, 22 bool Initialize(GLSurface* compatible_surface,
20 GpuPreference gpu_preference) override; 23 GpuPreference gpu_preference) override;
21 bool MakeCurrent(GLSurface* surface) override; 24 bool MakeCurrent(GLSurface* surface) override;
22 void ReleaseCurrent(GLSurface* surface) override; 25 void ReleaseCurrent(GLSurface* surface) override;
23 bool IsCurrent(GLSurface* surface) override; 26 bool IsCurrent(GLSurface* surface) override;
24 void* GetHandle() override; 27 void* GetHandle() override;
25 void OnSetSwapInterval(int interval) override; 28 void OnSetSwapInterval(int interval) override;
26 std::string GetGLRenderer() override; 29 std::string GetGLRenderer() override;
27 30
28 protected: 31 protected:
29 ~GLContextStub() override; 32 ~GLContextStub() override;
30 33
31 private: 34 private:
32 DISALLOW_COPY_AND_ASSIGN(GLContextStub); 35 DISALLOW_COPY_AND_ASSIGN(GLContextStub);
33 }; 36 };
34 37
35 } // namespace gfx 38 } // namespace gfx
36 39
37 #endif // UI_GL_GL_CONTEXT_STUB_H_ 40 #endif // UI_GL_GL_CONTEXT_STUB_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_context_ozone.cc ('k') | ui/gl/gl_context_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698