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

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

Issue 1682343002: AVDACodecImages keep a reference to the SurfaceTexture backing them (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/android_video_decode_accelerator.h" 5 #include "content/common/gpu/media/android_video_decode_accelerator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 return thread_checker_; 866 return thread_checker_;
867 } 867 }
868 868
869 base::WeakPtr<gpu::gles2::GLES2Decoder> 869 base::WeakPtr<gpu::gles2::GLES2Decoder>
870 AndroidVideoDecodeAccelerator::GetGlDecoder() const { 870 AndroidVideoDecodeAccelerator::GetGlDecoder() const {
871 return gl_decoder_; 871 return gl_decoder_;
872 } 872 }
873 873
874 void AndroidVideoDecodeAccelerator::OnFrameAvailable() { 874 void AndroidVideoDecodeAccelerator::OnFrameAvailable() {
875 // Remember: this may be on any thread. 875 // Remember: this may be on any thread.
876 DCHECK(strategy_);
liberato (no reviews please) 2016/02/10 06:39:12 why remove this?
watk 2016/02/11 00:26:51 strategy_ can't be null any more because it's alwa
877 strategy_->OnFrameAvailable(); 876 strategy_->OnFrameAvailable();
878 } 877 }
879 878
880 void AndroidVideoDecodeAccelerator::PostError( 879 void AndroidVideoDecodeAccelerator::PostError(
881 const ::tracked_objects::Location& from_here, 880 const ::tracked_objects::Location& from_here,
882 media::VideoDecodeAccelerator::Error error) { 881 media::VideoDecodeAccelerator::Error error) {
883 base::MessageLoop::current()->PostDelayedTask( 882 base::MessageLoop::current()->PostDelayedTask(
884 from_here, 883 from_here,
885 base::Bind(&AndroidVideoDecodeAccelerator::NotifyError, 884 base::Bind(&AndroidVideoDecodeAccelerator::NotifyError,
886 weak_this_factory_.GetWeakPtr(), error, error_sequence_token_), 885 weak_this_factory_.GetWeakPtr(), error, error_sequence_token_),
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 1014
1016 if (UseDeferredRenderingStrategy()) { 1015 if (UseDeferredRenderingStrategy()) {
1017 capabilities.flags = media::VideoDecodeAccelerator::Capabilities:: 1016 capabilities.flags = media::VideoDecodeAccelerator::Capabilities::
1018 NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE; 1017 NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE;
1019 } 1018 }
1020 1019
1021 return capabilities; 1020 return capabilities;
1022 } 1021 }
1023 1022
1024 } // namespace content 1023 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698