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

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

Issue 2039813002: Add format modifier IDs for EGL_EXT_image_dma_buf_import extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add format modifier IDs for EGL_EXT_image_dma_buf_import extension Created 4 years, 5 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 | « no previous file | components/exo/display.h » ('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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 287 }
288 case PORT_OUTPUT: { 288 case PORT_OUTPUT: {
289 // is_valid() is true for the first time the buffer is passed to the VDA. 289 // is_valid() is true for the first time the buffer is passed to the VDA.
290 // In that case, VDA needs to import the buffer first. 290 // In that case, VDA needs to import the buffer first.
291 OutputBufferInfo& info = buffers_pending_import_[index]; 291 OutputBufferInfo& info = buffers_pending_import_[index];
292 if (info.handle.is_valid()) { 292 if (info.handle.is_valid()) {
293 gfx::GpuMemoryBufferHandle handle; 293 gfx::GpuMemoryBufferHandle handle;
294 #if defined(USE_OZONE) 294 #if defined(USE_OZONE)
295 handle.native_pixmap_handle.fds.emplace_back( 295 handle.native_pixmap_handle.fds.emplace_back(
296 base::FileDescriptor(info.handle.release(), true)); 296 base::FileDescriptor(info.handle.release(), true));
297 handle.native_pixmap_handle.strides_and_offsets.emplace_back( 297 handle.native_pixmap_handle.planes.emplace_back(info.stride, 0, 0);
298 info.stride, 0);
299 #endif 298 #endif
300 vda_->ImportBufferForPicture(index, handle); 299 vda_->ImportBufferForPicture(index, handle);
301 } else { 300 } else {
302 vda_->ReusePictureBuffer(index); 301 vda_->ReusePictureBuffer(index);
303 } 302 }
304 break; 303 break;
305 } 304 }
306 default: 305 default:
307 NOTREACHED(); 306 NOTREACHED();
308 } 307 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 } 489 }
491 return true; 490 return true;
492 default: 491 default:
493 DLOG(ERROR) << "Invalid port: " << port; 492 DLOG(ERROR) << "Invalid port: " << port;
494 return false; 493 return false;
495 } 494 }
496 } 495 }
497 496
498 } // namespace arc 497 } // namespace arc
499 } // namespace chromeos 498 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | components/exo/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698