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

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

Issue 1832123002: Revert of Introduce GpuVideoDecodeAcceleratorFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <numeric> 10 #include <numeric>
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 glBindTexture(texture_target, 0); 658 glBindTexture(texture_target, 0);
659 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR); 659 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR);
660 } 660 }
661 661
662 void RenderingHelper::DeleteTexture(uint32_t texture_id) { 662 void RenderingHelper::DeleteTexture(uint32_t texture_id) {
663 CHECK_EQ(base::MessageLoop::current(), message_loop_); 663 CHECK_EQ(base::MessageLoop::current(), message_loop_);
664 glDeleteTextures(1, &texture_id); 664 glDeleteTextures(1, &texture_id);
665 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR); 665 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR);
666 } 666 }
667 667
668 gfx::GLContext* RenderingHelper::GetGLContext() { 668 scoped_refptr<gfx::GLContext> RenderingHelper::GetGLContext() {
669 return gl_context_.get(); 669 return gl_context_;
670 }
671
672 void* RenderingHelper::GetGLContextHandle() {
673 return gl_context_->GetHandle();
670 } 674 }
671 675
672 void* RenderingHelper::GetGLDisplay() { 676 void* RenderingHelper::GetGLDisplay() {
673 return gl_surface_->GetDisplay(); 677 return gl_surface_->GetDisplay();
674 } 678 }
675 679
676 void RenderingHelper::Clear() { 680 void RenderingHelper::Clear() {
677 videos_.clear(); 681 videos_.clear();
678 message_loop_ = NULL; 682 message_loop_ = NULL;
679 gl_context_ = NULL; 683 gl_context_ = NULL;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 // When the rendering falls behind, drops frames. 889 // When the rendering falls behind, drops frames.
886 while (scheduled_render_time_ < target) { 890 while (scheduled_render_time_ < target) {
887 scheduled_render_time_ += frame_duration_; 891 scheduled_render_time_ += frame_duration_;
888 DropOneFrameForAllVideos(); 892 DropOneFrameForAllVideos();
889 } 893 }
890 894
891 message_loop_->PostDelayedTask( 895 message_loop_->PostDelayedTask(
892 FROM_HERE, render_task_.callback(), target - now); 896 FROM_HERE, render_task_.callback(), target - now);
893 } 897 }
894 } // namespace content 898 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/rendering_helper.h ('k') | content/common/gpu/media/v4l2_slice_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698