Index: webkit/media/webvideoframe_impl.cc |
diff --git a/webkit/media/webvideoframe_impl.cc b/webkit/media/webvideoframe_impl.cc |
index 51532c9918ad9ad3fdd1a4640484ce2e0b335b52..d057d8f9a2892f27a7ef835abbc5c88ac4619a35 100644 |
--- a/webkit/media/webvideoframe_impl.cc |
+++ b/webkit/media/webvideoframe_impl.cc |
@@ -46,18 +46,6 @@ WebVideoFrame::Format WebVideoFrameImpl::format() const { |
return WebVideoFrame::FormatInvalid; |
} |
-unsigned WebVideoFrameImpl::width() const { |
- if (video_frame_.get()) |
- return video_frame_->data_size().width(); |
- return 0; |
-} |
- |
-unsigned WebVideoFrameImpl::height() const { |
- if (video_frame_.get()) |
- return video_frame_->data_size().height(); |
- return 0; |
-} |
- |
unsigned WebVideoFrameImpl::planes() const { |
if (!video_frame_.get()) |
return 0; |
@@ -78,12 +66,6 @@ unsigned WebVideoFrameImpl::planes() const { |
return 0; |
} |
-int WebVideoFrameImpl::stride(unsigned plane) const { |
- if (video_frame_.get()) |
- return static_cast<int>(video_frame_->stride(plane)); |
- return 0; |
-} |
- |
const void* WebVideoFrameImpl::data(unsigned plane) const { |
if (!video_frame_.get() || format() == FormatNativeTexture) |
return NULL; |
@@ -102,4 +84,40 @@ unsigned WebVideoFrameImpl::textureTarget() const { |
return video_frame_->texture_target(); |
} |
+unsigned WebVideoFrameImpl::visibleX() const { |
+ if (video_frame_.get()) |
Ami GONE FROM CHROMIUM
2012/10/25 00:43:07
flip the tests here and below to be consistent wit
sheu
2012/10/25 01:53:54
Done.
|
+ return video_frame_->visible_rect().x(); |
+ return 0; |
+} |
+ |
+unsigned WebVideoFrameImpl::visibleY() const { |
+ if (video_frame_.get()) |
+ return video_frame_->visible_rect().y(); |
+ return 0; |
+} |
+ |
+unsigned WebVideoFrameImpl::visibleWidth() const { |
+ if (video_frame_.get()) |
+ return video_frame_->visible_rect().width(); |
+ return 0; |
+} |
+ |
+unsigned WebVideoFrameImpl::visibleHeight() const { |
+ if (video_frame_.get()) |
+ return video_frame_->visible_rect().height(); |
+ return 0; |
+} |
+ |
+unsigned WebVideoFrameImpl::textureWidth() const { |
+ if (!video_frame_.get() || format() != FormatNativeTexture) |
+ return 0; |
+ return video_frame_->coded_size().width(); |
+} |
+ |
+unsigned WebVideoFrameImpl::textureHeight() const { |
+ if (!video_frame_.get() || format() != FormatNativeTexture) |
+ return 0; |
+ return video_frame_->coded_size().height(); |
+} |
+ |
} // namespace webkit_media |