OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_manager_android.h" | 5 #include "content/common/gpu/stream_texture_manager_android.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "content/common/android/surface_texture_bridge.h" | 8 #include "content/common/android/surface_texture_bridge.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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 route_id); | 112 route_id); |
113 stream_texture->set_matrix_changed_callback(matrix_cb); | 113 stream_texture->set_matrix_changed_callback(matrix_cb); |
114 stream_texture->surface_texture_bridge()->SetFrameAvailableCallback( | 114 stream_texture->surface_texture_bridge()->SetFrameAvailableCallback( |
115 frame_cb); | 115 frame_cb); |
116 stream_texture->surface_texture_bridge()->SetDefaultBufferSize( | 116 stream_texture->surface_texture_bridge()->SetDefaultBufferSize( |
117 initial_size.width(), initial_size.height()); | 117 initial_size.width(), initial_size.height()); |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 void StreamTextureManagerAndroid::EstablishStreamTexture( | 121 void StreamTextureManagerAndroid::EstablishStreamTexture( |
122 int32 stream_id, SurfaceTexturePeer::SurfaceTextureTarget type, | 122 int32 stream_id, int32 primary_id, int32 secondary_id) { |
123 int32 primary_id, int32 secondary_id) { | |
124 StreamTextureAndroid* stream_texture = textures_.Lookup(stream_id); | 123 StreamTextureAndroid* stream_texture = textures_.Lookup(stream_id); |
125 base::ProcessHandle process = channel_->renderer_pid(); | 124 base::ProcessHandle process = channel_->renderer_pid(); |
126 | 125 |
127 if (stream_texture) { | 126 if (stream_texture) { |
128 SurfaceTexturePeer::GetInstance()->EstablishSurfaceTexturePeer( | 127 SurfaceTexturePeer::GetInstance()->EstablishSurfaceTexturePeer( |
129 process, | 128 process, |
130 type, | |
131 stream_texture->surface_texture_bridge(), | 129 stream_texture->surface_texture_bridge(), |
132 primary_id, | 130 primary_id, |
133 secondary_id); | 131 secondary_id); |
134 } | 132 } |
135 } | 133 } |
136 | 134 |
137 } // namespace content | 135 } // namespace content |
OLD | NEW |