OLD | NEW |
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 if (surface_texture_) { | 94 if (surface_texture_) { |
95 UpdateTexImage(); | 95 UpdateTexImage(); |
96 surface_texture_->GetTransformMatrix(current_matrix_); | 96 surface_texture_->GetTransformMatrix(current_matrix_); |
97 } | 97 } |
98 memcpy(xform, current_matrix_, sizeof(current_matrix_)); | 98 memcpy(xform, current_matrix_, sizeof(current_matrix_)); |
99 YInvertMatrix(xform); | |
100 } | 99 } |
101 | 100 |
102 void StreamTexture::OnWillDestroyStub() { | 101 void StreamTexture::OnWillDestroyStub() { |
103 owner_stub_->RemoveDestructionObserver(this); | 102 owner_stub_->RemoveDestructionObserver(this); |
104 owner_stub_->channel()->RemoveRoute(route_id_); | 103 owner_stub_->channel()->RemoveRoute(route_id_); |
105 | 104 |
106 if (framebuffer_) { | 105 if (framebuffer_) { |
107 std::unique_ptr<ui::ScopedMakeCurrent> scoped_make_current( | 106 std::unique_ptr<ui::ScopedMakeCurrent> scoped_make_current( |
108 MakeStubCurrent()); | 107 MakeStubCurrent()); |
109 | 108 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 return false; | 272 return false; |
274 } | 273 } |
275 | 274 |
276 void StreamTexture::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 275 void StreamTexture::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
277 uint64_t process_tracing_id, | 276 uint64_t process_tracing_id, |
278 const std::string& dump_name) { | 277 const std::string& dump_name) { |
279 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914 | 278 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914 |
280 } | 279 } |
281 | 280 |
282 } // namespace gpu | 281 } // namespace gpu |
OLD | NEW |