OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/mac/scoped_nsautorelease_pool.h" | 8 #include "base/mac/scoped_nsautorelease_pool.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/stringize_macros.h" | 10 #include "base/strings/stringize_macros.h" |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 eglSwapBuffers(gl_display_, gl_surfaces_[window_id]); | 478 eglSwapBuffers(gl_display_, gl_surfaces_[window_id]); |
479 CHECK_EQ(static_cast<int>(eglGetError()), EGL_SUCCESS); | 479 CHECK_EQ(static_cast<int>(eglGetError()), EGL_SUCCESS); |
480 #endif | 480 #endif |
481 } | 481 } |
482 | 482 |
483 void RenderingHelper::DeleteTexture(uint32 texture_id) { | 483 void RenderingHelper::DeleteTexture(uint32 texture_id) { |
484 glDeleteTextures(1, &texture_id); | 484 glDeleteTextures(1, &texture_id); |
485 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR); | 485 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR); |
486 } | 486 } |
487 | 487 |
| 488 NativeContextType RenderingHelper::GetGLContext() { return gl_context_; } |
| 489 |
488 void* RenderingHelper::GetGLDisplay() { | 490 void* RenderingHelper::GetGLDisplay() { |
489 #if GL_VARIANT_GLX | 491 #if GL_VARIANT_GLX |
490 return x_display_; | 492 return x_display_; |
491 #else // EGL | 493 #else // EGL |
492 return gl_display_; | 494 return gl_display_; |
493 #endif | 495 #endif |
494 } | 496 } |
495 | 497 |
496 void RenderingHelper::Clear() { | 498 void RenderingHelper::Clear() { |
497 window_dimensions_.clear(); | 499 window_dimensions_.clear(); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 *rgb_ptr++ = *rgba_ptr++; | 557 *rgb_ptr++ = *rgba_ptr++; |
556 solid = solid && (*rgba_ptr == 0xff); | 558 solid = solid && (*rgba_ptr == 0xff); |
557 rgba_ptr++; | 559 rgba_ptr++; |
558 } | 560 } |
559 *alpha_solid = solid; | 561 *alpha_solid = solid; |
560 | 562 |
561 done->Signal(); | 563 done->Signal(); |
562 } | 564 } |
563 | 565 |
564 } // namespace content | 566 } // namespace content |
OLD | NEW |