| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // | 90 // |
| 91 // This is a workaround that is not intended to become a permanent part of the | 91 // This is a workaround that is not intended to become a permanent part of the |
| 92 // GLImage API. Theoretically, when Apple fixes their drivers, this can be | 92 // GLImage API. Theoretically, when Apple fixes their drivers, this can be |
| 93 // removed. https://crbug.com/581777#c36 | 93 // removed. https://crbug.com/581777#c36 |
| 94 virtual bool EmulatingRGB() const; | 94 virtual bool EmulatingRGB() const; |
| 95 | 95 |
| 96 // An identifier for subclasses. Necessary for safe downcasting. | 96 // An identifier for subclasses. Necessary for safe downcasting. |
| 97 enum class Type { NONE, MEMORY, IOSURFACE, DXGI_IMAGE }; | 97 enum class Type { NONE, MEMORY, IOSURFACE, DXGI_IMAGE }; |
| 98 virtual Type GetType() const; | 98 virtual Type GetType() const; |
| 99 | 99 |
| 100 void SetColorSpaceForScanout(const gfx::ColorSpace& color_space) { | 100 // Sets the color-space used to scanout from this image, if the image is |
| 101 color_space_ = color_space; | 101 // used as an overlay. |
| 102 } | 102 virtual void SetColorSpaceForScanout(const gfx::ColorSpace& color_space); |
| 103 | 103 |
| 104 const gfx::ColorSpace& color_space() const { return color_space_; } | 104 const gfx::ColorSpace& color_space() const { return color_space_; } |
| 105 | 105 |
| 106 protected: | 106 protected: |
| 107 virtual ~GLImage() {} | 107 virtual ~GLImage() {} |
| 108 | 108 |
| 109 gfx::ColorSpace color_space_; | 109 gfx::ColorSpace color_space_; |
| 110 | 110 |
| 111 private: | 111 private: |
| 112 friend class base::RefCounted<GLImage>; | 112 friend class base::RefCounted<GLImage>; |
| 113 | 113 |
| 114 DISALLOW_COPY_AND_ASSIGN(GLImage); | 114 DISALLOW_COPY_AND_ASSIGN(GLImage); |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 } // namespace gl | 117 } // namespace gl |
| 118 | 118 |
| 119 #endif // UI_GL_GL_IMAGE_H_ | 119 #endif // UI_GL_GL_IMAGE_H_ |
| OLD | NEW |