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

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 706023004: Collect VTVideoDecodeAccelerator frames into a work queue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vt_config_change
Patch Set: Work around PPAPI test failure. Created 6 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 | « content/common/gpu/media/vt_video_decode_accelerator.cc ('k') | no next file » | 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/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 base::WaitableEvent* event) { 392 base::WaitableEvent* event) {
393 factories->ReadPixels(texture_id, visible_rect, pixels); 393 factories->ReadPixels(texture_id, visible_rect, pixels);
394 event->Signal(); 394 event->Signal();
395 } 395 }
396 396
397 static void ReadPixelsSync( 397 static void ReadPixelsSync(
398 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories, 398 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories,
399 uint32 texture_id, 399 uint32 texture_id,
400 const gfx::Rect& visible_rect, 400 const gfx::Rect& visible_rect,
401 const SkBitmap& pixels) { 401 const SkBitmap& pixels) {
402 #if defined(OS_MACOSX)
403 // For Mac OS X, just return black. http://crbug.com/425708.
404 pixels.eraseARGB(255, 0, 255, 0);
405 return;
406 #endif
407
402 base::WaitableEvent event(true, false); 408 base::WaitableEvent event(true, false);
403 if (!factories->GetTaskRunner()->PostTask(FROM_HERE, 409 if (!factories->GetTaskRunner()->PostTask(FROM_HERE,
404 base::Bind(&ReadPixelsSyncInner, 410 base::Bind(&ReadPixelsSyncInner,
405 factories, 411 factories,
406 texture_id, 412 texture_id,
407 visible_rect, 413 visible_rect,
408 pixels, 414 pixels,
409 &event))) 415 &event)))
410 return; 416 return;
411 event.Wait(); 417 event.Wait();
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 DLOG(ERROR) << "VDA Error: " << error; 626 DLOG(ERROR) << "VDA Error: " << error;
621 DestroyVDA(); 627 DestroyVDA();
622 } 628 }
623 629
624 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 630 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
625 const { 631 const {
626 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 632 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
627 } 633 }
628 634
629 } // namespace media 635 } // namespace media
OLDNEW
« no previous file with comments | « content/common/gpu/media/vt_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698