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

Side by Side Diff: gpu/command_buffer/service/gl_context_stub.cc

Issue 2134006: Added EGL based GLContext.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/common/unittest_main.cc ('k') | gpu/command_buffer/service/gl_interface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This file implements the StubGLContext.
6
7 #include "build/build_config.h"
8 #include "app/gfx/gl/gl_context.h"
9
10 namespace gpu {
11
12 // A GLContext that does nothing for unit tests.
13 class StubGLContext : public gfx::GLContext {
14 public:
15
16 // Implement GLContext.
17 virtual void Destroy() {}
18 virtual bool MakeCurrent() { return true; }
19 virtual bool IsCurrent() { return true; }
20 virtual bool IsOffscreen() { return true; }
21 virtual void SwapBuffers() {}
22 virtual gfx::Size GetSize() { return gfx::Size(); }
23 virtual void* GetHandle() { return NULL; }
24 };
25
26 } // namespace gpu
27
28 namespace gfx {
29
30 #if !defined(OS_MACOSX)
31
32 GLContext* GLContext::CreateViewGLContext(PluginWindowHandle /* window */,
33 bool /* multisampled */) {
34 return new gpu::StubGLContext;
35 }
36
37 #endif // OS_MACOSX
38
39 GLContext* GLContext::CreateOffscreenGLContext(
40 void* /* shared_handle */) {
41 return new gpu::StubGLContext;
42 }
43
44 } // namespace gfx
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/unittest_main.cc ('k') | gpu/command_buffer/service/gl_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698