mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix GPUSurfaceGL includes on macOS (flutter/engine#4844)
macOS doesn't include GLES support.
This commit is contained in:
parent
9f169ccfbb
commit
9dcf4907f6
@ -4,9 +4,11 @@
|
||||
|
||||
#include "gpu_surface_gl.h"
|
||||
|
||||
#if OS_MACOSX || OS_IOS
|
||||
#if OS_IOS
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#elif OS_MACOSX
|
||||
#include <OpenGL/gl3.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
@ -85,7 +87,11 @@ static SkColorType FirstSupportedColorType(GrContext* context, GLenum* format) {
|
||||
*format = (y); \
|
||||
return (x); \
|
||||
}
|
||||
#if OS_MACOSX
|
||||
RETURN_IF_RENDERABLE(kRGBA_8888_SkColorType, GL_RGBA8);
|
||||
#else
|
||||
RETURN_IF_RENDERABLE(kRGBA_8888_SkColorType, GL_RGBA8_OES);
|
||||
#endif
|
||||
RETURN_IF_RENDERABLE(kARGB_4444_SkColorType, GL_RGBA4);
|
||||
RETURN_IF_RENDERABLE(kRGB_565_SkColorType, GL_RGB565);
|
||||
return kUnknown_SkColorType;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user