Initial commit for Android 11, syncing up to v300.f

This commit is contained in:
Andy CrossGate Yan
2020-10-29 03:02:26 +00:00
commit 1bc6933877
78 changed files with 12938 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
From 163f3f2b4a89df73d3ffede558d26bb0df966bbe Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Tue, 22 Sep 2020 10:38:04 +0200
Subject: [PATCH] GrGLCaps: allow ignoring vendor-supplied texture swizzle flag
* This is broken on MTK 8.1 vendor
Change-Id: I1ccae06f643f01e4ea6539e1d4e3c7df8d6e30ae
---
Android.bp | 1 +
src/gpu/gl/GrGLCaps.cpp | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/Android.bp b/Android.bp
index 122324c6ef..5ec949966a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -3,6 +3,7 @@
cc_library_static {
name: "libskia",
host_supported: true,
+ shared_libs: [ "libbase" ],
cflags: [
"-U_FORTIFY_SOURCE",
"-DATRACE_TAG=ATRACE_TAG_VIEW",
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 6a1bf56474..df007ba70c 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -22,6 +22,11 @@
#include "src/gpu/gl/GrGLTexture.h"
#include "src/utils/SkJSONWriter.h"
+#if defined(SK_BUILD_FOR_ANDROID)
+#include "android-base/properties.h"
+using android::base::GetBoolProperty;
+#endif
+
GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
const GrGLContextInfo& ctxInfo,
const GrGLInterface* glInterface) : INHERITED(contextOptions) {
@@ -273,6 +278,9 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
this->fShaderCaps->fTextureSwizzleAppliedInShader = false;
}
} // no WebGL support
+ if(GetBoolProperty("ro.skia.ignore_swizzle", false)) {
+ this->fShaderCaps->fTextureSwizzleAppliedInShader = true;
+ }
if (GR_IS_GR_GL(standard)) {
fMipMapLevelAndLodControlSupport = true;
--
2.17.1