Fix up Ganesh and Graphite defines.
SK_SUPPORT_GPU needed to be set to 1, and SK_GRAPHITE_ENABLED should be checked to see if it's defined, not its value. Change-Id: Ib762c590ceaa570ec98a76558657bbcee672c254 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543080 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
0fcf38ce16
commit
791f4bcf3e
2
BUILD.gn
2
BUILD.gn
@ -863,7 +863,7 @@ optional("gpu_shared") {
|
||||
deps = []
|
||||
public_defines = []
|
||||
if (skia_enable_gpu) {
|
||||
public_defines += [ "SK_SUPPORT_GPU" ]
|
||||
public_defines += [ "SK_SUPPORT_GPU=1" ]
|
||||
}
|
||||
if (skia_enable_graphite) {
|
||||
public_defines += [ "SK_GRAPHITE_ENABLED" ]
|
||||
|
@ -2275,7 +2275,7 @@ protected:
|
||||
|
||||
virtual void onDiscard();
|
||||
|
||||
#if (SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED)
|
||||
#if (SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED))
|
||||
/** Experimental
|
||||
*/
|
||||
virtual sk_sp<sktext::gpu::Slug> onConvertGlyphRunListToSlug(
|
||||
@ -2425,7 +2425,7 @@ private:
|
||||
SkCanvas& operator=(SkCanvas&&) = delete;
|
||||
SkCanvas& operator=(const SkCanvas&) = delete;
|
||||
|
||||
#if (SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED)
|
||||
#if (SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED))
|
||||
friend class sktext::gpu::Slug;
|
||||
/** Experimental
|
||||
* Convert a SkTextBlob to a sktext::gpu::Slug using the current canvas state.
|
||||
|
@ -236,7 +236,7 @@
|
||||
# define SK_SUPPORT_GPU 1
|
||||
#endif
|
||||
|
||||
#if SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED
|
||||
#if SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED)
|
||||
# if !defined(SK_ENABLE_SKSL)
|
||||
# define SK_ENABLE_SKSL
|
||||
# endif
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "include/utils/SkRandom.h"
|
||||
#include "samplecode/Sample.h"
|
||||
#include "src/utils/SkUTF.h"
|
||||
#if SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED
|
||||
#if SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED)
|
||||
#include "src/gpu/RectanizerPow2.h"
|
||||
#include "src/gpu/RectanizerSkyline.h"
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
#include "src/gpu/graphite/Device.h"
|
||||
#endif
|
||||
|
||||
#if (SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED)
|
||||
#if (SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED))
|
||||
#include "include/private/chromium/Slug.h"
|
||||
#endif
|
||||
|
||||
@ -2342,7 +2342,7 @@ void SkCanvas::onDrawGlyphRunList(const SkGlyphRunList& glyphRunList, const SkPa
|
||||
}
|
||||
}
|
||||
|
||||
#if (SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED)
|
||||
#if (SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED))
|
||||
sk_sp<Slug> SkCanvas::convertBlobToSlug(
|
||||
const SkTextBlob& blob, SkPoint origin, const SkPaint& paint) {
|
||||
TRACE_EVENT0("skia", TRACE_FUNC);
|
||||
|
@ -486,7 +486,7 @@ void SkBaseDevice::simplifyGlyphRunRSXFormAndRedraw(SkCanvas* canvas,
|
||||
}
|
||||
}
|
||||
|
||||
#if (SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED)
|
||||
#if (SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED))
|
||||
sk_sp<sktext::gpu::Slug> SkBaseDevice::convertGlyphRunListToSlug(
|
||||
const SkGlyphRunList& glyphRunList,
|
||||
const SkPaint& initialPaint,
|
||||
|
@ -337,7 +337,7 @@ protected:
|
||||
const SkPaint& drawingPaint) = 0;
|
||||
|
||||
// Slug handling routines.
|
||||
#if (SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED)
|
||||
#if (SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED))
|
||||
virtual sk_sp<sktext::gpu::Slug> convertGlyphRunListToSlug(
|
||||
const SkGlyphRunList& glyphRunList,
|
||||
const SkPaint& initialPaint,
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "src/core/SkScalerContext.h"
|
||||
#include "src/core/SkTextBlobPriv.h"
|
||||
|
||||
#if (SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED)
|
||||
#if (SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED))
|
||||
#include "src/text/gpu/SDFTControl.h"
|
||||
#endif
|
||||
|
||||
@ -87,7 +87,7 @@ private:
|
||||
const SkScalerContextFlags fScalerContextFlags;
|
||||
};
|
||||
|
||||
#if (SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED)
|
||||
#if (SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED))
|
||||
class SkGlyphRunListPainter {
|
||||
public:
|
||||
// A nullptr for process means that the calls to the cache will be performed, but none of the
|
||||
@ -142,5 +142,5 @@ public:
|
||||
const SkFont& runFont,
|
||||
const sktext::gpu::SDFTMatrixRange& matrixRange) = 0;
|
||||
};
|
||||
#endif // SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED
|
||||
#endif // SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED)
|
||||
#endif // SkGlyphRunPainter_DEFINED
|
||||
|
@ -695,7 +695,7 @@ bool Compiler::finalize(Program& program) {
|
||||
return this->errorCount() == 0;
|
||||
}
|
||||
|
||||
#if defined(SKSL_STANDALONE) || SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED
|
||||
#if defined(SKSL_STANDALONE) || SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED)
|
||||
|
||||
#if defined(SK_ENABLE_SPIRV_VALIDATION)
|
||||
static bool validate_spirv(ErrorReporter& reporter, std::string_view program) {
|
||||
@ -862,7 +862,7 @@ bool Compiler::toWGSL(Program& program, OutputStream& out) {
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // defined(SKSL_STANDALONE) || SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED
|
||||
#endif // defined(SKSL_STANDALONE) || SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED)
|
||||
|
||||
void Compiler::handleError(std::string_view msg, Position pos) {
|
||||
fErrorText += "error: ";
|
||||
|
@ -413,7 +413,7 @@ private:
|
||||
static std::unique_ptr<ShaderCaps> MakeShaderCaps();
|
||||
};
|
||||
|
||||
#if !defined(SKSL_STANDALONE) && (SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED)
|
||||
#if !defined(SKSL_STANDALONE) && (SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED))
|
||||
bool type_to_sksltype(const Context& context, const Type& type, SkSLType* outType);
|
||||
#endif
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "src/sksl/codegen/SkSLPipelineStageCodeGenerator.h"
|
||||
|
||||
#if defined(SKSL_STANDALONE) || SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED
|
||||
#if defined(SKSL_STANDALONE) || SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED)
|
||||
|
||||
#include "include/core/SkSpan.h"
|
||||
#include "include/core/SkTypes.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "include/core/SkTypes.h"
|
||||
|
||||
#if defined(SKSL_STANDALONE) || SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED
|
||||
#if defined(SKSL_STANDALONE) || SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED)
|
||||
|
||||
#include <string>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user