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

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

Issue 2106843002: Remove unsafe cast from ImageTransportSurfaceOverlayMac::ScheduleCALayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from piman. Created 4 years, 5 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
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // CHROMIUM image with internalformat GL_RGB, but the platform only supports 78 // CHROMIUM image with internalformat GL_RGB, but the platform only supports
79 // GL_RGBA. The client is responsible for implementing appropriate 79 // GL_RGBA. The client is responsible for implementing appropriate
80 // workarounds. The only support that the command buffer provides is format 80 // workarounds. The only support that the command buffer provides is format
81 // validation during calls to copyTexImage2D and copySubTexImage2D. 81 // validation during calls to copyTexImage2D and copySubTexImage2D.
82 // 82 //
83 // This is a workaround that is not intended to become a permanent part of the 83 // This is a workaround that is not intended to become a permanent part of the
84 // GLImage API. Theoretically, when Apple fixes their drivers, this can be 84 // GLImage API. Theoretically, when Apple fixes their drivers, this can be
85 // removed. https://crbug.com/581777#c36 85 // removed. https://crbug.com/581777#c36
86 virtual bool EmulatingRGB() const; 86 virtual bool EmulatingRGB() const;
87 87
88 // An identifier for subclasses. Necessary for safe downcasting.
89 enum class Type {
90 NONE,
91 IOSURFACE
92 };
93 virtual Type GetType() const;
94
88 protected: 95 protected:
89 virtual ~GLImage() {} 96 virtual ~GLImage() {}
90 97
91 private: 98 private:
92 friend class base::RefCounted<GLImage>; 99 friend class base::RefCounted<GLImage>;
93 100
94 DISALLOW_COPY_AND_ASSIGN(GLImage); 101 DISALLOW_COPY_AND_ASSIGN(GLImage);
95 }; 102 };
96 103
97 } // namespace gl 104 } // namespace gl
98 105
99 #endif // UI_GL_GL_IMAGE_H_ 106 #endif // UI_GL_GL_IMAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698