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 "gpu/command_buffer/service/context_group.h" | 10 #include "gpu/command_buffer/service/context_group.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 owner_stub_->RemoveDestructionObserver(this); | 95 owner_stub_->RemoveDestructionObserver(this); |
96 owner_stub_->channel()->RemoveRoute(route_id_); | 96 owner_stub_->channel()->RemoveRoute(route_id_); |
97 | 97 |
98 owner_stub_ = NULL; | 98 owner_stub_ = NULL; |
99 | 99 |
100 // If the owner goes away, there is no need to keep the SurfaceTexture around. | 100 // If the owner goes away, there is no need to keep the SurfaceTexture around. |
101 // The GL texture will keep working regardless with the currently bound frame. | 101 // The GL texture will keep working regardless with the currently bound frame. |
102 surface_texture_ = NULL; | 102 surface_texture_ = NULL; |
103 } | 103 } |
104 | 104 |
105 void StreamTexture::Destroy(bool have_context) { | |
106 NOTREACHED(); | |
107 } | |
108 | |
109 std::unique_ptr<ui::ScopedMakeCurrent> StreamTexture::MakeStubCurrent() { | 105 std::unique_ptr<ui::ScopedMakeCurrent> StreamTexture::MakeStubCurrent() { |
110 std::unique_ptr<ui::ScopedMakeCurrent> scoped_make_current; | 106 std::unique_ptr<ui::ScopedMakeCurrent> scoped_make_current; |
111 bool needs_make_current = | 107 bool needs_make_current = |
112 !owner_stub_->decoder()->GetGLContext()->IsCurrent(NULL); | 108 !owner_stub_->decoder()->GetGLContext()->IsCurrent(NULL); |
113 if (needs_make_current) { | 109 if (needs_make_current) { |
114 scoped_make_current.reset(new ui::ScopedMakeCurrent( | 110 scoped_make_current.reset(new ui::ScopedMakeCurrent( |
115 owner_stub_->decoder()->GetGLContext(), owner_stub_->surface())); | 111 owner_stub_->decoder()->GetGLContext(), owner_stub_->surface())); |
116 } | 112 } |
117 return scoped_make_current; | 113 return scoped_make_current; |
118 } | 114 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 return false; | 256 return false; |
261 } | 257 } |
262 | 258 |
263 void StreamTexture::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 259 void StreamTexture::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
264 uint64_t process_tracing_id, | 260 uint64_t process_tracing_id, |
265 const std::string& dump_name) { | 261 const std::string& dump_name) { |
266 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914 | 262 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914 |
267 } | 263 } |
268 | 264 |
269 } // namespace gpu | 265 } // namespace gpu |
OLD | NEW |