mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Avoid GL calls when compiling for Fuchsia. (flutter/engine#13847)
* Avoid GL calls when compiling for Fuchsia.
This commit is contained in:
parent
85e7580127
commit
c36b203a4e
@ -4,6 +4,7 @@
|
||||
|
||||
#include "flutter/shell/common/shell_io_manager.h"
|
||||
|
||||
#include "flutter/fml/build_config.h"
|
||||
#include "flutter/fml/message_loop.h"
|
||||
#include "flutter/shell/common/persistent_cache.h"
|
||||
#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
|
||||
@ -38,12 +39,14 @@ sk_sp<GrContext> ShellIOManager::CreateCompatibleResourceLoadingContext(
|
||||
// ES2 shading language when the ES3 external image extension is missing.
|
||||
options.fPreferExternalImagesOverES3 = true;
|
||||
|
||||
#if !OS_FUCHSIA
|
||||
if (auto context = GrContext::MakeGL(gl_interface, options)) {
|
||||
// Do not cache textures created by the image decoder. These textures
|
||||
// should be deleted when they are no longer referenced by an SkImage.
|
||||
context->setResourceCacheLimits(0, 0);
|
||||
return context;
|
||||
}
|
||||
#endif
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user