| 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 MOJO_GPU_GL_TEXTURE_H_ | 5 #ifndef MOJO_GPU_GL_TEXTURE_H_ |
| 6 #define MOJO_GPU_GL_TEXTURE_H_ | 6 #define MOJO_GPU_GL_TEXTURE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "mojo/gpu/gl_context.h" | 9 #include "mojo/gpu/gl_context.h" |
| 10 #include "mojo/services/geometry/public/interfaces/geometry.mojom.h" | 10 #include "mojo/services/geometry/interfaces/geometry.mojom.h" |
| 11 | 11 |
| 12 namespace mojo { | 12 namespace mojo { |
| 13 | 13 |
| 14 class GLTexture { | 14 class GLTexture { |
| 15 public: | 15 public: |
| 16 GLTexture(base::WeakPtr<GLContext> context, mojo::Size size); | 16 GLTexture(base::WeakPtr<GLContext> context, mojo::Size size); |
| 17 ~GLTexture(); | 17 ~GLTexture(); |
| 18 | 18 |
| 19 const mojo::Size& size() const { return size_; } | 19 const mojo::Size& size() const { return size_; } |
| 20 uint32_t texture_id() const { return texture_id_; } | 20 uint32_t texture_id() const { return texture_id_; } |
| 21 | 21 |
| 22 private: | 22 private: |
| 23 base::WeakPtr<GLContext> context_; | 23 base::WeakPtr<GLContext> context_; |
| 24 mojo::Size size_; | 24 mojo::Size size_; |
| 25 uint32_t texture_id_; | 25 uint32_t texture_id_; |
| 26 | 26 |
| 27 DISALLOW_COPY_AND_ASSIGN(GLTexture); | 27 DISALLOW_COPY_AND_ASSIGN(GLTexture); |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 } // namespace mojo | 30 } // namespace mojo |
| 31 | 31 |
| 32 #endif // MOJO_GPU_GL_TEXTURE_H_ | 32 #endif // MOJO_GPU_GL_TEXTURE_H_ |
| OLD | NEW |