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

Side by Side Diff: chrome/gpu/arc_gpu_video_decode_accelerator.cc

Issue 2462393002: Use texture ids passed from ARC as service ids in ArcGVDA (Closed)
Patch Set: Fixup DXVA Created 4 years, 1 month 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 | « no previous file | media/gpu/dxva_picture_buffer_win.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/gpu/arc_gpu_video_decode_accelerator.h" 5 #include "chrome/gpu/arc_gpu_video_decode_accelerator.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/numerics/safe_math.h" 9 #include "base/numerics/safe_math.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 140
141 if (number > kMaxBufferCount) { 141 if (number > kMaxBufferCount) {
142 DLOG(ERROR) << "Too many buffers: " << number; 142 DLOG(ERROR) << "Too many buffers: " << number;
143 arc_client_->OnError(INVALID_ARGUMENT); 143 arc_client_->OnError(INVALID_ARGUMENT);
144 return; 144 return;
145 } 145 }
146 146
147 std::vector<media::PictureBuffer> buffers; 147 std::vector<media::PictureBuffer> buffers;
148 for (size_t id = 0; id < number; ++id) { 148 for (size_t id = 0; id < number; ++id) {
149 media::PictureBuffer::TextureIds texture_ids;
150 texture_ids.push_back(0);
151
152 // TODO(owenlin): Make sure the |coded_size| is what we want. 149 // TODO(owenlin): Make sure the |coded_size| is what we want.
153 buffers.push_back(media::PictureBuffer(base::checked_cast<int32_t>(id), 150 buffers.push_back(
154 coded_size_, texture_ids)); 151 media::PictureBuffer(base::checked_cast<int32_t>(id), coded_size_));
155 } 152 }
156 vda_->AssignPictureBuffers(buffers); 153 vda_->AssignPictureBuffers(buffers);
157 154
158 buffers_pending_import_.clear(); 155 buffers_pending_import_.clear();
159 buffers_pending_import_.resize(number); 156 buffers_pending_import_.resize(number);
160 } 157 }
161 158
162 void ArcGpuVideoDecodeAccelerator::BindSharedMemory(PortType port, 159 void ArcGpuVideoDecodeAccelerator::BindSharedMemory(PortType port,
163 uint32_t index, 160 uint32_t index,
164 base::ScopedFD ashmem_fd, 161 base::ScopedFD ashmem_fd,
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 509 }
513 return true; 510 return true;
514 default: 511 default:
515 DLOG(ERROR) << "Invalid port: " << port; 512 DLOG(ERROR) << "Invalid port: " << port;
516 return false; 513 return false;
517 } 514 }
518 } 515 }
519 516
520 } // namespace arc 517 } // namespace arc
521 } // namespace chromeos 518 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | media/gpu/dxva_picture_buffer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698