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

Side by Side Diff: content/common/gpu/media/rendering_helper.cc

Issue 137023008: Add support for Tegra V4L2 VDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor nit Created 6 years, 8 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
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
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/media/rendering_helper.h ('k') | content/common/gpu/media/tegra_v4l2_video_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698