1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_GL_ANDROID_SURFACE_TEXTURE_TRACKER_H_
6 #define UI_GL_ANDROID_SURFACE_TEXTURE_TRACKER_H_
8 #include "base/memory/ref_counted.h"
9 #include "ui/gl/gl_export.h"
15 // This interface is used to take ownership of preallocated surface textures
17 class GL_EXPORT SurfaceTextureTracker {
19 static SurfaceTextureTracker* GetInstance();
20 static void InitInstance(SurfaceTextureTracker* tracker);
22 virtual scoped_refptr<SurfaceTexture> AcquireSurfaceTexture(
24 int secondary_id) = 0;
27 virtual ~SurfaceTextureTracker() {}
32 #endif // UI_GL_ANDROID_SURFACE_TEXTURE_TRACKER_H_