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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 if (!result) { | 51 if (!result) { |
52 char log[4096]; | 52 char log[4096]; |
53 glGetShaderInfoLog(shader, arraysize(log), NULL, log); | 53 glGetShaderInfoLog(shader, arraysize(log), NULL, log); |
54 LOG(FATAL) << log; | 54 LOG(FATAL) << log; |
55 } | 55 } |
56 glAttachShader(program, shader); | 56 glAttachShader(program, shader); |
57 glDeleteShader(shader); | 57 glDeleteShader(shader); |
58 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR); | 58 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR); |
59 } | 59 } |
60 | 60 |
61 namespace video_test_util { | 61 namespace content { |
62 | 62 |
63 class RenderingHelperGL : public RenderingHelper { | 63 class RenderingHelperGL : public RenderingHelper { |
64 public: | 64 public: |
65 RenderingHelperGL(); | 65 RenderingHelperGL(); |
66 virtual ~RenderingHelperGL(); | 66 virtual ~RenderingHelperGL(); |
67 | 67 |
68 // Implement RenderingHelper. | 68 // Implement RenderingHelper. |
69 virtual void Initialize(bool suppress_swap_to_display, | 69 virtual void Initialize(bool suppress_swap_to_display, |
70 int num_windows, | 70 int num_windows, |
71 int width, | 71 int width, |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 for (size_t i = 0; i < x_windows_.size(); ++i) { | 453 for (size_t i = 0; i < x_windows_.size(); ++i) { |
454 CHECK(XUnmapWindow(x_display_, x_windows_[i])); | 454 CHECK(XUnmapWindow(x_display_, x_windows_[i])); |
455 CHECK(XDestroyWindow(x_display_, x_windows_[i])); | 455 CHECK(XDestroyWindow(x_display_, x_windows_[i])); |
456 } | 456 } |
457 // Mimic newly created object. | 457 // Mimic newly created object. |
458 x_display_ = NULL; | 458 x_display_ = NULL; |
459 x_windows_.clear(); | 459 x_windows_.clear(); |
460 #endif | 460 #endif |
461 } | 461 } |
462 | 462 |
463 } // namespace video_test_util | 463 } // namespace content |
OLD | NEW |