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

Side by Side Diff: gpu/khronos_glcts_support/native/egl_native_windowless.cc

Issue 556333003: Add support for khronos gl-cts using its drawElements apis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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
OLDNEW
(Empty)
1 // Copyright 2014 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 // Using egl_native from gles2_conform_support
6 // TODO: We may want to phase out the old gles2_conform support in preference
7 // of this implementation. So eventually we'll need to move the egl_native
8 // stuff here or to a shareable location/path.
9 #include "gpu/gles2_conform_support/egl/display.h"
10
11 #include "third_party/khronos_glcts/framework/egl/tcuEglPlatform.hpp"
12
13 namespace egl {
14 namespace native {
15 namespace windowless {
16
17 class Window : public tcu::NativeWindow {
18 public:
19 Window(tcu::egl::Display& display,
20 EGLConfig config,
21 const EGLint* attribList,
22 int width,
23 int height)
24 : tcu::NativeWindow::NativeWindow(),
25 eglDisplay_(display),
26 eglSurface_(display, config, (EGLNativeWindowType)NULL, attribList) {}
27
28 virtual ~Window() {}
29
30 tcu::egl::Display& getEglDisplay() { return eglDisplay_; }
31
32 tcu::egl::WindowSurface& getEglSurface() { return eglSurface_; }
33
34 void processEvents() { return; }
35
36 private:
37 tcu::egl::Display& eglDisplay_;
38 tcu::egl::WindowSurface eglSurface_;
39 };
40
41 class Platform : public tcu::EglPlatform {
42 public:
43 Platform() : tcu::EglPlatform::EglPlatform() {}
44
45 virtual ~Platform() {}
46
47 tcu::NativeWindow* createWindow(tcu::NativeDisplay& dpy,
48 EGLConfig config,
49 const EGLint* attribList,
50 int width,
51 int height,
52 qpVisibility visibility) {
53 tcu::egl::Display& eglDisplay = dpy.getEglDisplay();
54 egl::Display* display =
55 static_cast<egl::Display*>(eglDisplay.getEGLDisplay());
56 display->SetCreateOffscreen(width, height);
57 return new Window(eglDisplay, config, attribList, width, height);
58 }
59 };
60
61 } // namespace windowless
62 } // namespace native
63 } // namespace egl
64
65 tcu::Platform* createPlatform(void) {
66 return new egl::native::windowless::Platform();
67 }
OLDNEW
« no previous file with comments | « gpu/khronos_glcts_support/khronos_glcts_test_expectations.txt ('k') | gpu/khronos_glcts_support/native/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698