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 "content/common/gpu/stream_texture_android.h" | 5 #include "content/common/gpu/stream_texture_android.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "content/common/android/surface_texture_peer.h" | 8 #include "content/common/android/surface_texture_peer.h" |
9 #include "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
10 #include "content/common/gpu/gpu_messages.h" | 10 #include "content/common/gpu/gpu_messages.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 void StreamTexture::OnWillDestroyStub() { | 88 void StreamTexture::OnWillDestroyStub() { |
89 owner_stub_->RemoveDestructionObserver(this); | 89 owner_stub_->RemoveDestructionObserver(this); |
90 owner_stub_->channel()->RemoveRoute(route_id_); | 90 owner_stub_->channel()->RemoveRoute(route_id_); |
91 owner_stub_ = NULL; | 91 owner_stub_ = NULL; |
92 | 92 |
93 // If the owner goes away, there is no need to keep the SurfaceTexture around. | 93 // If the owner goes away, there is no need to keep the SurfaceTexture around. |
94 // The GL texture will keep working regardless with the currently bound frame. | 94 // The GL texture will keep working regardless with the currently bound frame. |
95 surface_texture_ = NULL; | 95 surface_texture_ = NULL; |
96 } | 96 } |
97 | 97 |
98 void StreamTexture::Destroy() { | 98 void StreamTexture::Destroy(bool have_context) { |
99 NOTREACHED(); | 99 NOTREACHED(); |
100 } | 100 } |
101 | 101 |
102 void StreamTexture::WillUseTexImage() { | 102 void StreamTexture::WillUseTexImage() { |
103 if (!owner_stub_ || !surface_texture_.get()) | 103 if (!owner_stub_ || !surface_texture_.get()) |
104 return; | 104 return; |
105 | 105 |
106 if (has_pending_frame_) { | 106 if (has_pending_frame_) { |
107 scoped_ptr<ui::ScopedMakeCurrent> scoped_make_current; | 107 scoped_ptr<ui::ScopedMakeCurrent> scoped_make_current; |
108 bool needs_make_current = | 108 bool needs_make_current = |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 bool StreamTexture::BindTexImage(unsigned target) { | 196 bool StreamTexture::BindTexImage(unsigned target) { |
197 NOTREACHED(); | 197 NOTREACHED(); |
198 return false; | 198 return false; |
199 } | 199 } |
200 | 200 |
201 void StreamTexture::ReleaseTexImage(unsigned target) { | 201 void StreamTexture::ReleaseTexImage(unsigned target) { |
202 NOTREACHED(); | 202 NOTREACHED(); |
203 } | 203 } |
204 | 204 |
205 } // namespace content | 205 } // namespace content |
OLD | NEW |