OLD | NEW |
---|---|
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 #include "content/common/gpu/media/rendering_helper.h" | 5 #include "content/common/gpu/media/rendering_helper.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #if defined(OS_WIN) || defined(ARCH_CPU_ARMEL) | 9 #if defined(OS_WIN) || defined(ARCH_CPU_ARMEL) |
10 #include "third_party/angle/include/EGL/egl.h" // Must precede ui/gl headers! | 10 #include "third_party/angle/include/EGL/egl.h" // Must precede ui/gl headers! |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
186 #if GL_VARIANT_GLX | 186 #if GL_VARIANT_GLX |
187 x_display_ = base::MessagePumpForUI::GetDefaultXDisplay(); | 187 x_display_ = base::MessagePumpForUI::GetDefaultXDisplay(); |
188 CHECK(x_display_); | 188 CHECK(x_display_); |
189 gfx::InitializeGLBindings(gfx::kGLImplementationDesktopGL); | 189 gfx::InitializeGLBindings(gfx::kGLImplementationDesktopGL); |
190 CHECK(glXQueryVersion(x_display_, NULL, NULL)); | 190 CHECK(glXQueryVersion(x_display_, NULL, NULL)); |
191 const int fbconfig_attr[] = { | 191 const int fbconfig_attr[] = { |
192 GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, | 192 GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, |
193 GLX_RENDER_TYPE, GLX_RGBA_BIT, | 193 GLX_RENDER_TYPE, GLX_RGBA_BIT, |
194 GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT, | 194 GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT, |
195 GLX_BIND_TO_TEXTURE_RGB_EXT, GL_TRUE, | 195 GLX_BIND_TO_TEXTURE_RGB_EXT, GL_TRUE, |
196 GLX_Y_INVERTED_EXT, GL_FALSE, | |
197 GLX_RED_SIZE, 1, | |
198 GLX_GREEN_SIZE, 1, | |
199 GLX_BLUE_SIZE, 1, | |
200 GLX_ALPHA_SIZE, 1, | |
Ami GONE FROM CHROMIUM
2012/09/07 10:04:21
AFAICT we don't depend on these, and they break on
Pawel Osciak
2012/09/07 15:49:13
The inverted property didn't have any effect for m
Ami GONE FROM CHROMIUM
2012/09/12 00:53:10
Yes; no dice.
| |
201 GLX_DOUBLEBUFFER, True, | 196 GLX_DOUBLEBUFFER, True, |
202 GL_NONE, | 197 GL_NONE, |
203 }; | 198 }; |
204 int num_fbconfigs; | 199 int num_fbconfigs; |
205 scoped_ptr_malloc<GLXFBConfig, ScopedPtrXFree> glx_fb_configs( | 200 scoped_ptr_malloc<GLXFBConfig, ScopedPtrXFree> glx_fb_configs( |
206 glXChooseFBConfig(x_display_, DefaultScreen(x_display_), fbconfig_attr, | 201 glXChooseFBConfig(x_display_, DefaultScreen(x_display_), fbconfig_attr, |
207 &num_fbconfigs)); | 202 &num_fbconfigs)); |
208 CHECK(glx_fb_configs.get()); | 203 CHECK(glx_fb_configs.get()); |
209 CHECK_GT(num_fbconfigs, 0); | 204 CHECK_GT(num_fbconfigs, 0); |
210 x_visual_ = glXGetVisualFromFBConfig(x_display_, glx_fb_configs.get()[0]); | 205 x_visual_ = glXGetVisualFromFBConfig(x_display_, glx_fb_configs.get()[0]); |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
443 CHECK(XUnmapWindow(x_display_, x_windows_[i])); | 438 CHECK(XUnmapWindow(x_display_, x_windows_[i])); |
444 CHECK(XDestroyWindow(x_display_, x_windows_[i])); | 439 CHECK(XDestroyWindow(x_display_, x_windows_[i])); |
445 } | 440 } |
446 // Mimic newly created object. | 441 // Mimic newly created object. |
447 x_display_ = NULL; | 442 x_display_ = NULL; |
448 x_windows_.clear(); | 443 x_windows_.clear(); |
449 #endif | 444 #endif |
450 } | 445 } |
451 | 446 |
452 } // namespace video_test_util | 447 } // namespace video_test_util |
OLD | NEW |