| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_GL_GL_IMAGE_H_ | 5 #ifndef UI_GL_GL_IMAGE_H_ |
| 6 #define UI_GL_GL_IMAGE_H_ | 6 #define UI_GL_GL_IMAGE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // Get the size of the image. | 36 // Get the size of the image. |
| 37 virtual gfx::Size GetSize() = 0; | 37 virtual gfx::Size GetSize() = 0; |
| 38 | 38 |
| 39 // Get the internal format of the image. | 39 // Get the internal format of the image. |
| 40 virtual unsigned GetInternalFormat() = 0; | 40 virtual unsigned GetInternalFormat() = 0; |
| 41 | 41 |
| 42 // Bind image to texture currently bound to |target|. Returns true on success. | 42 // Bind image to texture currently bound to |target|. Returns true on success. |
| 43 // It is valid for an implementation to always return false. | 43 // It is valid for an implementation to always return false. |
| 44 virtual bool BindTexImage(unsigned target) = 0; | 44 virtual bool BindTexImage(unsigned target) = 0; |
| 45 | 45 |
| 46 // Bind image to texture currently bound to |target|, forcing the texture's | |
| 47 // internal format to the specified one. This is a feature not available on | |
| 48 // all platforms. Returns true on success. It is valid for an implementation | |
| 49 // to always return false. | |
| 50 virtual bool BindTexImageWithInternalformat(unsigned target, | |
| 51 unsigned internalformat); | |
| 52 | |
| 53 // Release image from texture currently bound to |target|. | 46 // Release image from texture currently bound to |target|. |
| 54 virtual void ReleaseTexImage(unsigned target) = 0; | 47 virtual void ReleaseTexImage(unsigned target) = 0; |
| 55 | 48 |
| 56 // Define texture currently bound to |target| by copying image into it. | 49 // Define texture currently bound to |target| by copying image into it. |
| 57 // Returns true on success. It is valid for an implementation to always | 50 // Returns true on success. It is valid for an implementation to always |
| 58 // return false. | 51 // return false. |
| 59 virtual bool CopyTexImage(unsigned target) = 0; | 52 virtual bool CopyTexImage(unsigned target) = 0; |
| 60 | 53 |
| 61 // Copy |rect| of image to |offset| in texture currently bound to |target|. | 54 // Copy |rect| of image to |offset| in texture currently bound to |target|. |
| 62 // Returns true on success. It is valid for an implementation to always | 55 // Returns true on success. It is valid for an implementation to always |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 94 |
| 102 private: | 95 private: |
| 103 friend class base::RefCounted<GLImage>; | 96 friend class base::RefCounted<GLImage>; |
| 104 | 97 |
| 105 DISALLOW_COPY_AND_ASSIGN(GLImage); | 98 DISALLOW_COPY_AND_ASSIGN(GLImage); |
| 106 }; | 99 }; |
| 107 | 100 |
| 108 } // namespace gl | 101 } // namespace gl |
| 109 | 102 |
| 110 #endif // UI_GL_GL_IMAGE_H_ | 103 #endif // UI_GL_GL_IMAGE_H_ |
| OLD | NEW |