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

Side by Side Diff: gpu/gles2_conform_support/egl/display.h

Issue 7066003: Revert 86306 (failed compile on win builder) - Move OpenGL ES 2.0 conformance test support into m... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « gpu/gles2_conform_support/egl/config.cc ('k') | gpu/gles2_conform_support/egl/display.cc » ('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) 2011 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 #ifndef GPU_GLES2_CONFORM_TEST_DISPLAY_H_
6 #define GPU_GLES2_CONFORM_TEST_DISPLAY_H_
7
8 #include <EGL/egl.h>
9
10 #include "base/basictypes.h"
11 #include "base/scoped_ptr.h"
12
13 namespace gpu {
14 class CommandBufferService;
15 class GpuScheduler;
16
17 namespace gles2 {
18 class GLES2CmdHelper;
19 class GLES2Implementation;
20 } // namespace gles2
21 } // namespace gpu
22
23 namespace egl {
24
25 class Config;
26 class Surface;
27
28 class Display {
29 public:
30 explicit Display(EGLNativeDisplayType display_id);
31 virtual ~Display();
32
33 bool is_initialized() const { return is_initialized_; }
34 bool Initialize();
35
36 // Config routines.
37 bool IsValidConfig(EGLConfig config);
38 bool GetConfigs(EGLConfig* configs, EGLint config_size, EGLint* num_config);
39 bool GetConfigAttrib(EGLConfig config, EGLint attribute, EGLint* value);
40
41 // Surface routines.
42 bool IsValidNativeWindow(EGLNativeWindowType win);
43 bool IsValidSurface(EGLSurface surface);
44 EGLSurface CreateWindowSurface(EGLConfig config,
45 EGLNativeWindowType win,
46 const EGLint* attrib_list);
47 void DestroySurface(EGLSurface surface);
48 void SwapBuffers(EGLSurface surface);
49
50 // Context routines.
51 bool IsValidContext(EGLContext ctx);
52 EGLContext CreateContext(EGLConfig config,
53 EGLContext share_ctx,
54 const EGLint* attrib_list);
55 void DestroyContext(EGLContext ctx);
56 bool MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx);
57
58 private:
59 EGLNativeDisplayType display_id_;
60
61 bool is_initialized_;
62 scoped_ptr<gpu::CommandBufferService> command_buffer_;
63 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_;
64 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_;
65 int32 transfer_buffer_id_;
66
67 // TODO(alokp): Support more than one config, surface, and context.
68 scoped_ptr<Config> config_;
69 scoped_ptr<Surface> surface_;
70 scoped_ptr<gpu::gles2::GLES2Implementation> context_;
71
72 DISALLOW_COPY_AND_ASSIGN(Display);
73 };
74
75 } // namespace egl
76
77 #endif // GPU_GLES2_CONFORM_TEST_DISPLAY_H_
OLDNEW
« no previous file with comments | « gpu/gles2_conform_support/egl/config.cc ('k') | gpu/gles2_conform_support/egl/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698