Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3599)

Unified Diff: cc/layers/video_frame_provider_client_impl.cc

Issue 1848923003: Revert of Make Android StreamTexture implement GLStreamTextureImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/layers/video_frame_provider_client_impl.cc
diff --git a/cc/layers/video_frame_provider_client_impl.cc b/cc/layers/video_frame_provider_client_impl.cc
index d9734d097e8a55044d527e770b15d04790330c7b..f2c5eb2627a9140831b433939e3a21268deb5416 100644
--- a/cc/layers/video_frame_provider_client_impl.cc
+++ b/cc/layers/video_frame_provider_client_impl.cc
@@ -32,6 +32,14 @@
// frame provider client that does not require a lock. The same is true of
// the call to Stop().
provider_->SetVideoFrameProviderClient(this);
+
+ // This matrix is the default transformation for stream textures, and flips
+ // on the Y axis.
+ stream_texture_matrix_ = gfx::Transform(
+ 1.0, 0.0, 0.0, 0.0,
+ 0.0, -1.0, 0.0, 1.0,
+ 0.0, 0.0, 1.0, 0.0,
+ 0.0, 0.0, 0.0, 1.0);
}
VideoFrameProviderClientImpl::~VideoFrameProviderClientImpl() {
@@ -97,6 +105,12 @@
return provider_ && provider_->HasCurrentFrame();
}
+const gfx::Transform& VideoFrameProviderClientImpl::StreamTextureMatrix()
+ const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return stream_texture_matrix_;
+}
+
void VideoFrameProviderClientImpl::StopUsingProvider() {
{
// Block the provider from shutting down until this client is done
@@ -137,6 +151,17 @@
active_video_layer_->SetNeedsRedraw();
}
+void VideoFrameProviderClientImpl::DidUpdateMatrix(const float* matrix) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ stream_texture_matrix_ = gfx::Transform(
+ matrix[0], matrix[4], matrix[8], matrix[12],
+ matrix[1], matrix[5], matrix[9], matrix[13],
+ matrix[2], matrix[6], matrix[10], matrix[14],
+ matrix[3], matrix[7], matrix[11], matrix[15]);
+ if (active_video_layer_)
+ active_video_layer_->SetNeedsRedraw();
+}
+
void VideoFrameProviderClientImpl::OnBeginFrame(const BeginFrameArgs& args) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(rendering_);
« no previous file with comments | « cc/layers/video_frame_provider_client_impl.h ('k') | cc/layers/video_frame_provider_client_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698