Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: ui/gl/gl_image.h

Issue 2999923002: Revert of Allow creating GLImage-backed textures with glTexStorage2D. (Closed)
Patch Set: rebase Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gl/gl_bindings.h ('k') | ui/gl/gl_image.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // Sets the color-space used to scanout from this image, if the image is 100 void SetColorSpaceForScanout(const gfx::ColorSpace& color_space) {
101 // used as an overlay. 101 color_space_ = color_space;
102 virtual void SetColorSpaceForScanout(const gfx::ColorSpace& color_space); 102 }
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_
OLDNEW
« no previous file with comments | « ui/gl/gl_bindings.h ('k') | ui/gl/gl_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698