OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "gpu/command_buffer/service/gl_utils.h" | 11 #include "gpu/command_buffer/service/gl_utils.h" |
12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gl { |
15 class GLImage; | 15 class GLImage; |
16 } | 16 } |
17 | 17 |
18 namespace gpu { | 18 namespace gpu { |
19 namespace gles2 { | 19 namespace gles2 { |
20 | 20 |
21 class Texture; | 21 class Texture; |
22 | 22 |
23 class NativeImageBuffer : public base::RefCountedThreadSafe<NativeImageBuffer> { | 23 class NativeImageBuffer : public base::RefCountedThreadSafe<NativeImageBuffer> { |
24 public: | 24 public: |
25 static scoped_refptr<NativeImageBuffer> Create(GLuint texture_id); | 25 static scoped_refptr<NativeImageBuffer> Create(GLuint texture_id); |
26 | 26 |
27 virtual void AddClient(gfx::GLImage* client) = 0; | 27 virtual void AddClient(gl::GLImage* client) = 0; |
28 virtual void RemoveClient(gfx::GLImage* client) = 0; | 28 virtual void RemoveClient(gl::GLImage* client) = 0; |
29 virtual bool IsClient(gfx::GLImage* client) = 0; | 29 virtual bool IsClient(gl::GLImage* client) = 0; |
30 virtual void BindToTexture(GLenum target) const = 0; | 30 virtual void BindToTexture(GLenum target) const = 0; |
31 | 31 |
32 protected: | 32 protected: |
33 friend class base::RefCountedThreadSafe<NativeImageBuffer>; | 33 friend class base::RefCountedThreadSafe<NativeImageBuffer>; |
34 NativeImageBuffer() {} | 34 NativeImageBuffer() {} |
35 virtual ~NativeImageBuffer() {} | 35 virtual ~NativeImageBuffer() {} |
36 | 36 |
37 DISALLOW_COPY_AND_ASSIGN(NativeImageBuffer); | 37 DISALLOW_COPY_AND_ASSIGN(NativeImageBuffer); |
38 }; | 38 }; |
39 | 39 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 bool defined_; | 101 bool defined_; |
102 | 102 |
103 // Only support textures with one face and one level. | 103 // Only support textures with one face and one level. |
104 LevelInfo level_info_; | 104 LevelInfo level_info_; |
105 }; | 105 }; |
106 | 106 |
107 } // namespage gles2 | 107 } // namespage gles2 |
108 } // namespace gpu | 108 } // namespace gpu |
109 | 109 |
110 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ | 110 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ |
OLD | NEW |