Chromium Code Reviews| Index: content/common/gpu/stream_texture_manager_android.cc |
| diff --git a/content/common/gpu/stream_texture_manager_android.cc b/content/common/gpu/stream_texture_manager_android.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1aa7dc2103124d068de01dc9887013ef2c1fffb1 |
| --- /dev/null |
| +++ b/content/common/gpu/stream_texture_manager_android.cc |
| @@ -0,0 +1,58 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "content/common/gpu/stream_texture_manager_android.h" |
| + |
| +#include "content/common/android/surface_texture_bridge.h" |
| +#include "content/common/gpu/gpu_channel.h" |
| + |
| +namespace content { |
| + |
| +StreamTextureManagerAndroid::StreamTextureAndroid::StreamTextureAndroid( |
| + GpuChannel* channel, int service_id) |
| + : surface_texture_(new content::SurfaceTextureBridge(service_id)), |
|
jam
2012/07/02 17:54:06
nit: ditto
qinmin
2012/07/02 19:29:50
Done.
|
| + channel_(channel) { |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +StreamTextureManagerAndroid::StreamTextureAndroid::~StreamTextureAndroid() { |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +void StreamTextureManagerAndroid::StreamTextureAndroid::Update() { |
| + surface_texture_->UpdateTexImage(); |
| +} |
| + |
| +StreamTextureManagerAndroid::StreamTextureManagerAndroid( |
| + GpuChannel* channel) |
| + : channel_(channel) { |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +StreamTextureManagerAndroid::~StreamTextureManagerAndroid() { |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +GLuint StreamTextureManagerAndroid::CreateStreamTexture(uint32 service_id, |
| + uint32 client_id) { |
| + // service_id: the actual GL texture name |
| + // client_id: texture name given to the client in the renderer (unused here) |
| + // The return value here is what glCreateStreamTextureCHROMIUM() will return |
| + // to identify the stream (i.e. surface texture). |
| + StreamTextureAndroid* texture = new StreamTextureAndroid( |
| + channel_, service_id); |
| + return textures_.Add(texture); |
| +} |
| + |
| +void StreamTextureManagerAndroid::DestroyStreamTexture(uint32 service_id) { |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +gpu::StreamTexture* StreamTextureManagerAndroid::LookupStreamTexture( |
| + uint32 service_id) { |
| + NOTIMPLEMENTED(); |
| + return NULL; |
| +} |
| + |
| +} // namespace content |