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

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

Issue 774353002: Actually return black for ReadPixelsSync() on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 event->Signal(); 395 event->Signal();
396 } 396 }
397 397
398 static void ReadPixelsSync( 398 static void ReadPixelsSync(
399 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories, 399 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories,
400 uint32 texture_id, 400 uint32 texture_id,
401 const gfx::Rect& visible_rect, 401 const gfx::Rect& visible_rect,
402 const SkBitmap& pixels) { 402 const SkBitmap& pixels) {
403 #if defined(OS_MACOSX) 403 #if defined(OS_MACOSX)
404 // For Mac OS X, just return black. http://crbug.com/425708. 404 // For Mac OS X, just return black. http://crbug.com/425708.
405 pixels.eraseARGB(255, 0, 255, 0); 405 pixels.eraseARGB(0, 0, 0, 0);
406 return; 406 return;
407 #endif 407 #endif
408 408
409 base::WaitableEvent event(true, false); 409 base::WaitableEvent event(true, false);
410 if (!factories->GetTaskRunner()->PostTask(FROM_HERE, 410 if (!factories->GetTaskRunner()->PostTask(FROM_HERE,
411 base::Bind(&ReadPixelsSyncInner, 411 base::Bind(&ReadPixelsSyncInner,
412 factories, 412 factories,
413 texture_id, 413 texture_id,
414 visible_rect, 414 visible_rect,
415 pixels, 415 pixels,
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 DLOG(ERROR) << "VDA Error: " << error; 628 DLOG(ERROR) << "VDA Error: " << error;
629 DestroyVDA(); 629 DestroyVDA();
630 } 630 }
631 631
632 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 632 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
633 const { 633 const {
634 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 634 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
635 } 635 }
636 636
637 } // namespace media 637 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698