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

Side by Side 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, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/ipc/service/stream_texture_android.h" 5 #include "gpu/ipc/service/stream_texture_android.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/stringize_macros.h" 10 #include "base/strings/stringize_macros.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 StreamTexture::~StreamTexture() { 85 StreamTexture::~StreamTexture() {
86 if (owner_stub_) { 86 if (owner_stub_) {
87 owner_stub_->RemoveDestructionObserver(this); 87 owner_stub_->RemoveDestructionObserver(this);
88 owner_stub_->channel()->RemoveRoute(route_id_); 88 owner_stub_->channel()->RemoveRoute(route_id_);
89 } 89 }
90 } 90 }
91 91
92 // gpu::gles2::GLStreamTextureMatrix implementation 92 // gpu::gles2::GLStreamTextureMatrix implementation
93 void StreamTexture::GetTextureMatrix(float xform[16]) { 93 void StreamTexture::GetTextureMatrix(float xform[16]) {
94 UpdateTexImage(); 94 if (surface_texture_) {
95 surface_texture_->GetTransformMatrix(xform); 95 UpdateTexImage();
96 surface_texture_->GetTransformMatrix(current_matrix_);
97 }
98 memcpy(xform, current_matrix_, sizeof(current_matrix_));
96 } 99 }
97 100
98 void StreamTexture::OnWillDestroyStub() { 101 void StreamTexture::OnWillDestroyStub() {
99 owner_stub_->RemoveDestructionObserver(this); 102 owner_stub_->RemoveDestructionObserver(this);
100 owner_stub_->channel()->RemoveRoute(route_id_); 103 owner_stub_->channel()->RemoveRoute(route_id_);
101 104
102 if (framebuffer_) { 105 if (framebuffer_) {
103 std::unique_ptr<ui::ScopedMakeCurrent> scoped_make_current( 106 std::unique_ptr<ui::ScopedMakeCurrent> scoped_make_current(
104 MakeStubCurrent()); 107 MakeStubCurrent());
105 108
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 return false; 272 return false;
270 } 273 }
271 274
272 void StreamTexture::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, 275 void StreamTexture::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
273 uint64_t process_tracing_id, 276 uint64_t process_tracing_id,
274 const std::string& dump_name) { 277 const std::string& dump_name) {
275 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914 278 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914
276 } 279 }
277 280
278 } // namespace gpu 281 } // namespace gpu
OLDNEW
« 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