diff options
author | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-12 18:23:13 +0000 |
---|---|---|
committer | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-12 18:23:13 +0000 |
commit | e89b871ca795e2df641750782e5091ca45b55d0f (patch) | |
tree | 414ec7cd342428da430e97752c9e35542152f64d /cc | |
parent | 358d746e4985f4ee63fc969cfabe4bb7e3e1c860 (diff) | |
download | chromium_src-e89b871ca795e2df641750782e5091ca45b55d0f.zip chromium_src-e89b871ca795e2df641750782e5091ca45b55d0f.tar.gz chromium_src-e89b871ca795e2df641750782e5091ca45b55d0f.tar.bz2 |
Split the hole punching logic from GOOGLE_TV #ifdef into VIDEO_HOLE
This CL splits the hole punching logic into another ifdef, so that the code can be reused by different parties and can be easily managed
See discussion: https://groups.google.com/a/google.com/forum/#!topic/chrome-gpu/eIM1RwarUmk
BUG=323157
Review URL: https://codereview.chromium.org/110683002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r-- | cc/layers/video_layer_impl.cc | 8 | ||||
-rw-r--r-- | cc/resources/video_resource_updater.cc | 12 | ||||
-rw-r--r-- | cc/resources/video_resource_updater.h | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc index b48b20f..314fed6 100644 --- a/cc/layers/video_layer_impl.cc +++ b/cc/layers/video_layer_impl.cc @@ -18,9 +18,9 @@ #include "cc/trees/proxy.h" #include "media/base/video_frame.h" -#if defined(GOOGLE_TV) +#if defined(VIDEO_HOLE) #include "cc/quads/solid_color_draw_quad.h" -#endif +#endif // defined(VIDEO_HOLE) namespace cc { @@ -245,7 +245,7 @@ void VideoLayerImpl::AppendQuads(QuadSink* quad_sink, append_quads_data); break; } -#if defined(GOOGLE_TV) +#if defined(VIDEO_HOLE) // This block and other blocks wrapped around #if defined(GOOGLE_TV) is not // maintained by the general compositor team. Please contact the following // people instead: @@ -266,7 +266,7 @@ void VideoLayerImpl::AppendQuads(QuadSink* quad_sink, append_quads_data); break; } -#endif +#endif // defined(VIDEO_HOLE) case VideoFrameExternalResources::NONE: NOTIMPLEMENTED(); break; diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc index c67e0d2..4abeab1 100644 --- a/cc/resources/video_resource_updater.cc +++ b/cc/resources/video_resource_updater.cc @@ -71,9 +71,9 @@ bool VideoResourceUpdater::VerifyFrame( case media::VideoFrame::YV16: case media::VideoFrame::YV12J: case media::VideoFrame::NATIVE_TEXTURE: -#if defined(GOOGLE_TV) +#if defined(VIDEO_HOLE) case media::VideoFrame::HOLE: -#endif +#endif // defined(VIDEO_HOLE) return true; // Unacceptable inputs. ¯\(°_o)/¯ @@ -109,9 +109,9 @@ static gfx::Size SoftwarePlaneDimension( case media::VideoFrame::I420: case media::VideoFrame::NATIVE_TEXTURE: case media::VideoFrame::HISTOGRAM_MAX: -#if defined(GOOGLE_TV) +#if defined(VIDEO_HOLE) case media::VideoFrame::HOLE: -#endif +#endif // defined(VIDEO_HOLE) NOTREACHED(); } } @@ -124,13 +124,13 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes( const scoped_refptr<media::VideoFrame>& video_frame) { media::VideoFrame::Format input_frame_format = video_frame->format(); -#if defined(GOOGLE_TV) +#if defined(VIDEO_HOLE) if (input_frame_format == media::VideoFrame::HOLE) { VideoFrameExternalResources external_resources; external_resources.type = VideoFrameExternalResources::HOLE; return external_resources; } -#endif +#endif // defined(VIDEO_HOLE) // Only YUV software video frames are supported. DCHECK(input_frame_format == media::VideoFrame::YV12 || diff --git a/cc/resources/video_resource_updater.h b/cc/resources/video_resource_updater.h index e3476d4..2a27739 100644 --- a/cc/resources/video_resource_updater.h +++ b/cc/resources/video_resource_updater.h @@ -37,11 +37,11 @@ class CC_EXPORT VideoFrameExternalResources { STREAM_TEXTURE_RESOURCE, IO_SURFACE, -#if defined(GOOGLE_TV) +#if defined(VIDEO_HOLE) // TODO(danakj): Implement this with a solid color layer instead of a video // frame and video layer. HOLE, -#endif +#endif // defined(VIDEO_HOLE) // TODO(danakj): Remove this and abstract TextureMailbox into // "ExternalResource" that can hold a hardware or software backing. |