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