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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // GL_RGBA. The client is responsible for implementing appropriate | 86 // GL_RGBA. The client is responsible for implementing appropriate |
87 // workarounds. The only support that the command buffer provides is format | 87 // workarounds. The only support that the command buffer provides is format |
88 // validation during calls to copyTexImage2D and copySubTexImage2D. | 88 // validation during calls to copyTexImage2D and copySubTexImage2D. |
89 // | 89 // |
90 // This is a workaround that is not intended to become a permanent part of the | 90 // This is a workaround that is not intended to become a permanent part of the |
91 // GLImage API. Theoretically, when Apple fixes their drivers, this can be | 91 // GLImage API. Theoretically, when Apple fixes their drivers, this can be |
92 // removed. https://crbug.com/581777#c36 | 92 // removed. https://crbug.com/581777#c36 |
93 virtual bool EmulatingRGB() const; | 93 virtual bool EmulatingRGB() const; |
94 | 94 |
95 // An identifier for subclasses. Necessary for safe downcasting. | 95 // An identifier for subclasses. Necessary for safe downcasting. |
96 enum class Type { NONE, IOSURFACE, DXGI_IMAGE }; | 96 enum class Type { NONE, MEMORY, IOSURFACE, DXGI_IMAGE }; |
97 virtual Type GetType() const; | 97 virtual Type GetType() const; |
98 | 98 |
99 protected: | 99 protected: |
100 virtual ~GLImage() {} | 100 virtual ~GLImage() {} |
101 | 101 |
102 private: | 102 private: |
103 friend class base::RefCounted<GLImage>; | 103 friend class base::RefCounted<GLImage>; |
104 | 104 |
105 DISALLOW_COPY_AND_ASSIGN(GLImage); | 105 DISALLOW_COPY_AND_ASSIGN(GLImage); |
106 }; | 106 }; |
107 | 107 |
108 } // namespace gl | 108 } // namespace gl |
109 | 109 |
110 #endif // UI_GL_GL_IMAGE_H_ | 110 #endif // UI_GL_GL_IMAGE_H_ |
OLD | NEW |