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

Unified Diff: cc/layers/video_frame_provider_client_impl.cc

Issue 2150993002: Revert of Always apply UniformMatrix4fvStreamTextureMatrixCHROMIUM matrix argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « cc/layers/video_frame_provider_client_impl.h ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 751d32f83b29ee471b68dc2ba897464837f79fb0..6f9cb8f00c46c960dc0852d78da90fcb26b6194f 100644
--- a/cc/layers/video_frame_provider_client_impl.cc
+++ b/cc/layers/video_frame_provider_client_impl.cc
@@ -35,6 +35,14 @@
// 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() {
@@ -98,6 +106,12 @@
bool VideoFrameProviderClientImpl::HasCurrentFrame() {
base::AutoLock locker(provider_lock_);
return provider_ && provider_->HasCurrentFrame();
+}
+
+const gfx::Transform& VideoFrameProviderClientImpl::StreamTextureMatrix()
+ const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return stream_texture_matrix_;
}
void VideoFrameProviderClientImpl::StopUsingProvider() {
« no previous file with comments | « cc/layers/video_frame_provider_client_impl.h ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698