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

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: DCHECK and format fixup 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/v4l2_slice_video_decode_accelerator.cc » ('j') | media/video/picture.cc » ('J')
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
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; 149 media::PictureBuffer::TextureIds texture_ids;
150 texture_ids.push_back(0); 150 texture_ids.push_back(0);
151 151
152 // TODO(owenlin): Make sure the |coded_size| is what we want. 152 // TODO(owenlin): Make sure the |coded_size| is what we want.
153 buffers.push_back(media::PictureBuffer(base::checked_cast<int32_t>(id), 153 buffers.push_back(
154 coded_size_, texture_ids)); 154 media::PictureBuffer(base::checked_cast<int32_t>(id), coded_size_,
155 media::PictureBuffer::TextureIds(), texture_ids));
155 } 156 }
156 vda_->AssignPictureBuffers(buffers); 157 vda_->AssignPictureBuffers(buffers);
157 158
158 buffers_pending_import_.clear(); 159 buffers_pending_import_.clear();
159 buffers_pending_import_.resize(number); 160 buffers_pending_import_.resize(number);
160 } 161 }
161 162
162 void ArcGpuVideoDecodeAccelerator::BindSharedMemory(PortType port, 163 void ArcGpuVideoDecodeAccelerator::BindSharedMemory(PortType port,
163 uint32_t index, 164 uint32_t index,
164 base::ScopedFD ashmem_fd, 165 base::ScopedFD ashmem_fd,
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 513 }
513 return true; 514 return true;
514 default: 515 default:
515 DLOG(ERROR) << "Invalid port: " << port; 516 DLOG(ERROR) << "Invalid port: " << port;
516 return false; 517 return false;
517 } 518 }
518 } 519 }
519 520
520 } // namespace arc 521 } // namespace arc
521 } // namespace chromeos 522 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | media/gpu/v4l2_slice_video_decode_accelerator.cc » ('j') | media/video/picture.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698