Chromium Code Reviews| Index: media/gpu/vaapi_jpeg_decode_accelerator.cc |
| diff --git a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc b/media/gpu/vaapi_jpeg_decode_accelerator.cc |
| similarity index 96% |
| rename from content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc |
| rename to media/gpu/vaapi_jpeg_decode_accelerator.cc |
| index 64931f6f57a5f096861c1ccb3c2f825714fd8865..c92301bfa041bf32e04f2c524042211557766159 100644 |
| --- a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc |
| +++ b/media/gpu/vaapi_jpeg_decode_accelerator.cc |
| @@ -2,7 +2,7 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "content/common/gpu/media/vaapi_jpeg_decode_accelerator.h" |
| +#include "media/gpu/vaapi_jpeg_decode_accelerator.h" |
| #include <stddef.h> |
| #include <string.h> |
| @@ -13,26 +13,25 @@ |
| #include "base/metrics/histogram.h" |
| #include "base/thread_task_runner_handle.h" |
| #include "base/trace_event/trace_event.h" |
| -#include "content/common/gpu/media/shared_memory_region.h" |
| -#include "content/common/gpu/media/vaapi_picture.h" |
| #include "gpu/ipc/service/gpu_channel.h" |
| #include "media/base/video_frame.h" |
| #include "media/filters/jpeg_parser.h" |
| +#include "media/gpu/shared_memory_region.h" |
| +#include "media/gpu/vaapi_picture.h" |
| #include "third_party/libyuv/include/libyuv.h" |
| -namespace content { |
| +namespace media { |
| namespace { |
| // UMA errors that the VaapiJpegDecodeAccelerator class reports. |
| enum VAJDADecoderFailure { |
| VAAPI_ERROR = 0, |
| - // UMA requires that max must be greater than 1. |
| - VAJDA_DECODER_FAILURES_MAX = 2, |
| + VAJDA_DECODER_FAILURES_MAX, |
|
Pawel Osciak
2016/04/19 09:22:55
Could we please keep the comment to explain why +1
Mark Dittmer
2016/05/02 03:51:23
The max is no longer greater than 1. If left, the
|
| }; |
| static void ReportToUMA(VAJDADecoderFailure failure) { |
| UMA_HISTOGRAM_ENUMERATION("Media.VAJDA.DecoderFailure", failure, |
| - VAJDA_DECODER_FAILURES_MAX); |
| + VAJDA_DECODER_FAILURES_MAX + 1); |
| } |
| static unsigned int VaSurfaceFormatForJpeg( |
| @@ -84,8 +83,7 @@ VaapiJpegDecodeAccelerator::DecodeRequest::DecodeRequest( |
| shm(std::move(shm)), |
| video_frame(video_frame) {} |
| -VaapiJpegDecodeAccelerator::DecodeRequest::~DecodeRequest() { |
| -} |
| +VaapiJpegDecodeAccelerator::DecodeRequest::~DecodeRequest() {} |
| void VaapiJpegDecodeAccelerator::NotifyError(int32_t bitstream_buffer_id, |
| Error error) { |
| @@ -319,4 +317,4 @@ bool VaapiJpegDecodeAccelerator::IsSupported() { |
| return VaapiWrapper::IsJpegDecodeSupported(); |
| } |
| -} // namespace content |
| +} // namespace media |