Reland "Reland "export SkRuntimeShaderBuilder""

This is a reland of a950fef9db
... with copy/move ctors/operators deleted for Clang warning.

Original change's description:
> Reland "export SkRuntimeShaderBuilder"
>
> This is a reland of f1a937f141
>
> Original change's description:
> > export SkRuntimeShaderBuilder
> >
> > ... like we do SkRuntimeEffect.
> >
> > Change-Id: I024f1716b2f818d24b002213c02fa83d2b271123
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377757
> > Commit-Queue: Mike Klein <mtklein@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > Auto-Submit: Mike Klein <mtklein@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> Cq-Include-Trybots: luci.skia.skia.primary:Build-Win-MSVC-x86_64-Release-Shared
> Change-Id: I82c440be4ea53e21c6c3d2b6999d832f71563d83
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377859
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

Change-Id: I29aaa84b6ff995b4226f2b9b34a94f4d2e9964dd
Cq-Include-Trybots: luci.skia.skia.primary:Build-Win-MSVC-x86_64-Release-Shared,Build-Win-Clang-x86_64-Release-Shared
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377867
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
Mike Klein 2021-03-01 10:27:56 -06:00 committed by Skia Commit-Bot
parent 95d0badecf
commit 2960b6a62c

View File

@ -11,6 +11,7 @@
#include "include/core/SkData.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkShader.h"
#include "include/core/SkString.h"
#include "include/private/SkSLSampleUsage.h"
@ -19,7 +20,6 @@
class GrRecordingContext;
class SkColorFilter;
class SkImage;
class SkShader;
namespace SkSL {
class FunctionDefinition;
@ -196,11 +196,17 @@ private:
* Note that SkRuntimeShaderBuilder is built entirely on the public API of SkRuntimeEffect,
* so can be used as-is or serve as inspiration for other interfaces or binding techniques.
*/
class SkRuntimeShaderBuilder {
class SK_API SkRuntimeShaderBuilder {
public:
SkRuntimeShaderBuilder(sk_sp<SkRuntimeEffect>);
~SkRuntimeShaderBuilder();
SkRuntimeShaderBuilder(const SkRuntimeShaderBuilder&) = delete;
SkRuntimeShaderBuilder(SkRuntimeShaderBuilder&&) = delete;
SkRuntimeShaderBuilder& operator=(const SkRuntimeShaderBuilder&) = delete;
SkRuntimeShaderBuilder& operator=(SkRuntimeShaderBuilder&&) = delete;
struct BuilderUniform {
// Copy 'val' to this variable. No type conversion is performed - 'val' must be same
// size as expected by the effect. Information about the variable can be queried by