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

Side by Side Diff: media/gpu/dxva_video_decode_accelerator_win.cc

Issue 2382113002: Use clearer names for the PictureBuffer texture id members (Closed)
Patch Set: Added comments Created 4 years, 2 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
« no previous file with comments | « media/gpu/dxva_picture_buffer_win.cc ('k') | media/gpu/fake_video_decode_accelerator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "media/gpu/dxva_video_decode_accelerator_win.h" 5 #include "media/gpu/dxva_video_decode_accelerator_win.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #if !defined(OS_WIN) 9 #if !defined(OS_WIN)
10 #error This file should only be built on Windows. 10 #error This file should only be built on Windows.
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 "Failed to provide requested picture buffers. (Got " 841 "Failed to provide requested picture buffers. (Got "
842 << buffers.size() << ", requested " << kNumPictureBuffers << ")", 842 << buffers.size() << ", requested " << kNumPictureBuffers << ")",
843 INVALID_ARGUMENT, ); 843 INVALID_ARGUMENT, );
844 844
845 RETURN_AND_NOTIFY_ON_FAILURE(make_context_current_cb_.Run(), 845 RETURN_AND_NOTIFY_ON_FAILURE(make_context_current_cb_.Run(),
846 "Failed to make context current", 846 "Failed to make context current",
847 PLATFORM_FAILURE, ); 847 PLATFORM_FAILURE, );
848 // Copy the picture buffers provided by the client to the available list, 848 // Copy the picture buffers provided by the client to the available list,
849 // and mark these buffers as available for use. 849 // and mark these buffers as available for use.
850 for (size_t buffer_index = 0; buffer_index < buffers.size(); ++buffer_index) { 850 for (size_t buffer_index = 0; buffer_index < buffers.size(); ++buffer_index) {
851 DCHECK_LE(1u, buffers[buffer_index].texture_ids().size()); 851 DCHECK_LE(1u, buffers[buffer_index].client_texture_ids().size());
852 linked_ptr<DXVAPictureBuffer> picture_buffer = 852 linked_ptr<DXVAPictureBuffer> picture_buffer =
853 DXVAPictureBuffer::Create(*this, buffers[buffer_index], egl_config_); 853 DXVAPictureBuffer::Create(*this, buffers[buffer_index], egl_config_);
854 RETURN_AND_NOTIFY_ON_FAILURE(picture_buffer.get(), 854 RETURN_AND_NOTIFY_ON_FAILURE(picture_buffer.get(),
855 "Failed to allocate picture buffer", 855 "Failed to allocate picture buffer",
856 PLATFORM_FAILURE, ); 856 PLATFORM_FAILURE, );
857 857
858 bool inserted = 858 bool inserted =
859 output_picture_buffers_ 859 output_picture_buffers_
860 .insert(std::make_pair(buffers[buffer_index].id(), picture_buffer)) 860 .insert(std::make_pair(buffers[buffer_index].id(), picture_buffer))
861 .second; 861 .second;
(...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after
2686 SetState(kConfigChange); 2686 SetState(kConfigChange);
2687 Invalidate(); 2687 Invalidate();
2688 Initialize(config_, client_); 2688 Initialize(config_, client_);
2689 decoder_thread_task_runner_->PostTask( 2689 decoder_thread_task_runner_->PostTask(
2690 FROM_HERE, 2690 FROM_HERE,
2691 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, 2691 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers,
2692 base::Unretained(this))); 2692 base::Unretained(this)));
2693 } 2693 }
2694 2694
2695 } // namespace media 2695 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/dxva_picture_buffer_win.cc ('k') | media/gpu/fake_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698