OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 // Using egl_native from gles2_conform_support | 5 // Using egl_native from gles2_conform_support |
6 // TODO: We may want to phase out the old gles2_conform support in preference | 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 | 7 // of this implementation. So eventually we'll need to move the egl_native |
8 // stuff here or to a shareable location/path. | 8 // stuff here or to a shareable location/path. |
9 #include "gpu/gles2_conform_support/egl/display.h" | 9 #include "gpu/gles2_conform_support/egl/test_support.h" |
10 | 10 |
11 #include "third_party/khronos_glcts/framework/egl/tcuEglPlatform.hpp" | 11 #include "third_party/khronos_glcts/framework/egl/tcuEglPlatform.hpp" |
12 | 12 |
13 namespace egl { | 13 namespace egl { |
14 namespace native { | 14 namespace native { |
15 namespace windowless { | 15 namespace windowless { |
16 | 16 |
17 class Surface : public tcu::egl::WindowSurface { | 17 class Surface : public tcu::egl::WindowSurface { |
18 public: | 18 public: |
19 Surface(tcu::egl::Display& display, | 19 Surface(tcu::egl::Display& display, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 ~Platform() override {} | 68 ~Platform() override {} |
69 | 69 |
70 tcu::NativeWindow* createWindow(tcu::NativeDisplay& dpy, | 70 tcu::NativeWindow* createWindow(tcu::NativeDisplay& dpy, |
71 EGLConfig config, | 71 EGLConfig config, |
72 const EGLint* attribList, | 72 const EGLint* attribList, |
73 int width, | 73 int width, |
74 int height, | 74 int height, |
75 qpVisibility visibility) override { | 75 qpVisibility visibility) override { |
76 tcu::egl::Display& eglDisplay = dpy.getEglDisplay(); | 76 tcu::egl::Display& eglDisplay = dpy.getEglDisplay(); |
77 egl::Display* display = | 77 EGLDisplay display = eglDisplay.getEGLDisplay(); |
78 static_cast<egl::Display*>(eglDisplay.getEGLDisplay()); | 78 CommandBufferGLESSetNextCreateWindowSurfaceCreatesPBuffer(display, width, |
79 display->SetCreateOffscreen(width, height); | 79 height); |
80 return new Window(eglDisplay, config, attribList, width, height); | 80 return new Window(eglDisplay, config, attribList, width, height); |
81 } | 81 } |
82 }; | 82 }; |
83 | 83 |
84 } // namespace windowless | 84 } // namespace windowless |
85 } // namespace native | 85 } // namespace native |
86 } // namespace egl | 86 } // namespace egl |
87 | 87 |
88 tcu::Platform* createPlatform(void) { | 88 tcu::Platform* createPlatform(void) { |
89 return new egl::native::windowless::Platform(); | 89 return new egl::native::windowless::Platform(); |
90 } | 90 } |
OLD | NEW |