Move SkRuntimeEffect.h to include/effects

Change-Id: I0b11d4210c6e663cfb4854fc33e1396fd79fe9a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
Brian Osman 2020-01-02 11:55:24 -05:00 committed by Skia Commit-Bot
parent 1bf3199970
commit ee426f223f
17 changed files with 24 additions and 16 deletions

View File

@ -8,6 +8,9 @@ Milestone 81
<Insert new notes here- top is most recent.>
Moved SkRuntimeEffect to public API. This is the new (experimental) interface to custom SkSL
shaders and color filters.
Added BC1 compressed format support. Metal and Vulkan seem to only support the BC
formats on desktop machines.

View File

@ -10,7 +10,7 @@
#include "include/core/SkColorFilter.h"
#include "include/core/SkSurface.h"
#include "include/effects/SkImageFilters.h"
#include "src/core/SkRuntimeEffect.h"
#include "include/effects/SkRuntimeEffect.h"
#include "tools/Resources.h"
// Just need an interesting filter, nothing to special about colormatrix

View File

@ -14,7 +14,7 @@
#include "include/core/SkRefCnt.h"
#include "include/core/SkSize.h"
#include "include/core/SkString.h"
#include "src/core/SkRuntimeEffect.h"
#include "include/effects/SkRuntimeEffect.h"
#include "tools/Resources.h"
#include <stddef.h>

View File

@ -11,7 +11,7 @@
#include "include/core/SkPaint.h"
#include "include/core/SkSize.h"
#include "include/core/SkString.h"
#include "src/core/SkRuntimeEffect.h"
#include "include/effects/SkRuntimeEffect.h"
static const char* RUNTIME_FUNCTIONS_SRC = R"(
uniform half4 gColor;

View File

@ -11,7 +11,7 @@
#include "include/core/SkPaint.h"
#include "include/core/SkSize.h"
#include "include/core/SkString.h"
#include "src/core/SkRuntimeEffect.h"
#include "include/effects/SkRuntimeEffect.h"
const char* gProg = R"(
uniform half4 gColor;

View File

@ -321,7 +321,6 @@ skia_core_sources = [
"$_src/core/SkRTree.h",
"$_src/core/SkRTree.cpp",
"$_src/core/SkRuntimeEffect.cpp",
"$_src/core/SkRuntimeEffect.h",
"$_src/core/SkRWBuffer.cpp",
"$_src/core/SkScalar.cpp",
"$_src/core/SkScalerContext.cpp",

View File

@ -28,7 +28,13 @@ struct PipelineStageArgs;
struct Program;
}
class SkRuntimeEffect : public SkRefCnt {
/*
* SkRuntimeEffect supports creating custom SkShader and SkColorFilter objects using Skia's SkSL
* shading language.
* *
* This API is experimental and subject to change.
*/
class SK_API SkRuntimeEffect : public SkRefCnt {
public:
struct Variable {
enum class Qualifier {

View File

@ -45,6 +45,7 @@
#include "include/effects/SkDiscretePathEffect.h"
#include "include/effects/SkGradientShader.h"
#include "include/effects/SkImageFilters.h"
#include "include/effects/SkRuntimeEffect.h"
#include "include/effects/SkTrimPathEffect.h"
#include "include/pathops/SkPathOps.h"
#include "include/utils/SkParsePath.h"
@ -52,7 +53,6 @@
#include "modules/skshaper/include/SkShaper.h"
#include "src/core/SkFontMgrPriv.h"
#include "src/core/SkResourceCache.h"
#include "src/core/SkRuntimeEffect.h"
#include "src/sksl/SkSLCompiler.h"
#include <iostream>

View File

@ -9,6 +9,7 @@
#include "include/core/SkRefCnt.h"
#include "include/core/SkString.h"
#include "include/core/SkUnPreMultiply.h"
#include "include/effects/SkRuntimeEffect.h"
#include "include/private/SkNx.h"
#include "include/private/SkTDArray.h"
#include "src/core/SkArenaAlloc.h"
@ -17,7 +18,6 @@
#include "src/core/SkColorSpaceXformSteps.h"
#include "src/core/SkRasterPipeline.h"
#include "src/core/SkReadBuffer.h"
#include "src/core/SkRuntimeEffect.h"
#include "src/core/SkVM.h"
#include "src/core/SkWriteBuffer.h"

View File

@ -6,8 +6,8 @@
*/
#include "include/core/SkData.h"
#include "include/effects/SkRuntimeEffect.h"
#include "src/core/SkColorFilterPriv.h"
#include "src/core/SkRuntimeEffect.h"
#include "src/shaders/SkRTShader.h"
#include "src/sksl/SkSLByteCode.h"
#include "src/sksl/SkSLCompiler.h"

View File

@ -12,7 +12,7 @@
#include "src/core/SkReadBuffer.h"
#if SK_SUPPORT_GPU
#include "src/core/SkRuntimeEffect.h"
#include "include/effects/SkRuntimeEffect.h"
#include "src/gpu/effects/GrSkSLFP.h"
GR_FP_SRC_STRING SKSL_OVERDRAW_SRC = R"(

View File

@ -16,8 +16,8 @@
#include "src/core/SkSpecialSurface.h"
#include "src/core/SkWriteBuffer.h"
#if SK_SUPPORT_GPU
#include "include/effects/SkRuntimeEffect.h"
#include "include/private/GrRecordingContext.h"
#include "src/core/SkRuntimeEffect.h"
#include "src/gpu/GrClip.h"
#include "src/gpu/GrColorSpaceXform.h"
#include "src/gpu/GrRecordingContextPriv.h"

View File

@ -11,6 +11,7 @@
#include "include/core/SkColorFilter.h"
#include "include/core/SkData.h"
#include "include/core/SkPixelRef.h"
#include "include/effects/SkRuntimeEffect.h"
#include "include/gpu/GrContext.h"
#include "include/gpu/GrTypes.h"
#include "include/private/GrRecordingContext.h"
@ -25,7 +26,6 @@
#include "src/core/SkMipMap.h"
#include "src/core/SkPaintPriv.h"
#include "src/core/SkResourceCache.h"
#include "src/core/SkRuntimeEffect.h"
#include "src/core/SkTraceEvent.h"
#include "src/gpu/GrBitmapTextureMaker.h"
#include "src/gpu/GrCaps.h"

View File

@ -7,9 +7,9 @@
#include "src/gpu/effects/GrSkSLFP.h"
#include "include/effects/SkRuntimeEffect.h"
#include "include/gpu/GrTexture.h"
#include "include/private/GrContext_Base.h"
#include "src/core/SkRuntimeEffect.h"
#include "src/gpu/GrBaseContextPriv.h"
#include "src/sksl/SkSLUtil.h"

View File

@ -6,10 +6,10 @@
*/
#include "include/core/SkData.h"
#include "include/effects/SkRuntimeEffect.h"
#include "src/core/SkArenaAlloc.h"
#include "src/core/SkRasterPipeline.h"
#include "src/core/SkReadBuffer.h"
#include "src/core/SkRuntimeEffect.h"
#include "src/core/SkWriteBuffer.h"
#include "src/shaders/SkRTShader.h"

View File

@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
#include "src/core/SkRuntimeEffect.h"
#include "include/effects/SkRuntimeEffect.h"
#include "tests/Test.h"
DEF_TEST(SkRuntimeEffectInvalidInputs, r) {

View File

@ -10,7 +10,7 @@
#include "tools/viewer/Slide.h"
#include "src/core/SkRuntimeEffect.h"
#include "include/effects/SkRuntimeEffect.h"
class SkSLSlide : public Slide {
public: