OLD | NEW |
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 "content/common/gpu/media/mac_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/mac_video_decode_accelerator.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #import "base/mac/foundation_util.h" | 9 #import "base/mac/foundation_util.h" |
10 #import "base/memory/ref_counted_memory.h" | 10 #import "base/memory/ref_counted_memory.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 MacVideoDecodeAccelerator::MacVideoDecodeAccelerator( | 97 MacVideoDecodeAccelerator::MacVideoDecodeAccelerator( |
98 CGLContextObj cgl_context, media::VideoDecodeAccelerator::Client* client) | 98 CGLContextObj cgl_context, media::VideoDecodeAccelerator::Client* client) |
99 : client_(client), | 99 : client_(client), |
100 cgl_context_(cgl_context), | 100 cgl_context_(cgl_context), |
101 did_build_config_record_(false) { | 101 did_build_config_record_(false) { |
102 } | 102 } |
103 | 103 |
104 bool MacVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile) { | 104 bool MacVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile) { |
105 DCHECK(CalledOnValidThread()); | 105 DCHECK(CalledOnValidThread()); |
106 | 106 |
| 107 // MacVDA still fails on too many videos to be useful, even to users who |
| 108 // ignore the GPU blacklist. Fail unconditionally here until enough of |
| 109 // crbug.com/133828's blockers are resolved. |
| 110 if (true) |
| 111 return false; |
| 112 |
107 if (profile < media::H264PROFILE_MIN || profile > media::H264PROFILE_MAX) | 113 if (profile < media::H264PROFILE_MIN || profile > media::H264PROFILE_MAX) |
108 return false; | 114 return false; |
109 | 115 |
110 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize(); | 116 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize(); |
111 if (!io_surface_support) | 117 if (!io_surface_support) |
112 return false; | 118 return false; |
113 | 119 |
114 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( | 120 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( |
115 &MacVideoDecodeAccelerator::NotifyInitializeDone, base::AsWeakPtr(this))); | 121 &MacVideoDecodeAccelerator::NotifyInitializeDone, base::AsWeakPtr(this))); |
116 return true; | 122 return true; |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 MacVideoDecodeAccelerator::UsedPictureInfo::~UsedPictureInfo() { | 381 MacVideoDecodeAccelerator::UsedPictureInfo::~UsedPictureInfo() { |
376 } | 382 } |
377 | 383 |
378 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() { | 384 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() { |
379 } | 385 } |
380 | 386 |
381 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() { | 387 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() { |
382 } | 388 } |
383 | 389 |
384 } // namespace content | 390 } // namespace content |
OLD | NEW |