Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1170)

Unified Diff: content/common/gpu/stream_texture_manager_android.cc

Issue 10695020: upstream SurfaceTextureListener and SurfaceTextureBridge class for android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing nits Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698