summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/MediaTexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/android/MediaTexture.cpp')
-rw-r--r--WebCore/platform/graphics/android/MediaTexture.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/WebCore/platform/graphics/android/MediaTexture.cpp b/WebCore/platform/graphics/android/MediaTexture.cpp
index 4ec50d8..9836a01 100644
--- a/WebCore/platform/graphics/android/MediaTexture.cpp
+++ b/WebCore/platform/graphics/android/MediaTexture.cpp
@@ -94,7 +94,7 @@ void VideoTexture::initNativeWindowIfNeeded()
m_newVideoRequestCond.signal();
}
-void VideoTexture::drawVideo(const TransformationMatrix& matrix)
+void VideoTexture::drawVideo(const TransformationMatrix& matrix, const SkRect& parentBounds)
{
android::Mutex::Autolock lock(m_videoLock);
@@ -107,8 +107,17 @@ void VideoTexture::drawVideo(const TransformationMatrix& matrix)
float surfaceMatrix[16];
m_surfaceTexture->getTransformMatrix(surfaceMatrix);
+ SkRect dimensions = m_dimensions;
+ dimensions.offset(parentBounds.fLeft, parentBounds.fTop);
+
+#ifdef DEBUG
+ if (!parentBounds.contains(dimensions)) {
+ XLOG("The video exceeds is parent's bounds.");
+ }
+#endif // DEBUG
+
TilesManager::instance()->shader()->drawVideoLayerQuad(matrix, surfaceMatrix,
- m_dimensions, m_textureId);
+ dimensions, m_textureId);
}
ANativeWindow* VideoTexture::requestNewWindow()