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

Unified Diff: gpu/ipc/service/stream_texture_android.cc

Issue 2016643002: Do not update, and return the previous matrix if surface_texture_ is null. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/stream_texture_android.cc
diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_texture_android.cc
index 49ad894acc0d18cfaf7f6dcc67d4b5ecf93eac23..1cb840c18b8bee0febfa0ed728f72f5f65babe42 100644
--- a/gpu/ipc/service/stream_texture_android.cc
+++ b/gpu/ipc/service/stream_texture_android.cc
@@ -91,8 +91,11 @@ StreamTexture::~StreamTexture() {
// gpu::gles2::GLStreamTextureMatrix implementation
void StreamTexture::GetTextureMatrix(float xform[16]) {
- UpdateTexImage();
- surface_texture_->GetTransformMatrix(xform);
+ if (surface_texture_) {
+ UpdateTexImage();
+ surface_texture_->GetTransformMatrix(current_matrix_);
+ }
+ memcpy(xform, current_matrix_, sizeof(current_matrix_));
}
void StreamTexture::OnWillDestroyStub() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698