Skip to content

Commit

Permalink
Switch Bazel builds to use SkRP by default.
Browse files Browse the repository at this point in the history
This CL gives our Bazel builds the same default settings as our
GN builds (as of http://review.skia.org/676617). This change led to
some minor IWYU ripples as well.

Change-Id: I4503ca9a6381ad3817d19b10baadf9645e3faaef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/682976
Auto-Submit: John Stiles <[email protected]>
Commit-Queue: John Stiles <[email protected]>
Reviewed-by: Chris Mumford <[email protected]>
  • Loading branch information
johnstiles-google authored and SkCQ committed Apr 26, 2023
1 parent 7c1f1eb commit 3ab6d7d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 17 deletions.
4 changes: 2 additions & 2 deletions bazel/common_config_settings/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ bool_flag(

bool_flag(
name = "enable_skvm",
default = True,
default = False,
)

bool_flag(
name = "enable_sksl_in_raster_pipeline",
default = False,
default = True,
)

bool_flag(
Expand Down
2 changes: 2 additions & 0 deletions defines.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ GENERAL_DEFINES = [
"//src/sksl:enable_skslc_true": [
"SKSL_STANDALONE",
"SK_DISABLE_TRACING",
"SK_ENABLE_SKSL_IN_RASTER_PIPELINE",
"SK_ENABLE_SKVM",
"SK_ENABLE_SPIRV_CROSS",
"SK_ENABLE_SPIRV_VALIDATION",
"SK_ENABLE_WGSL_VALIDATION",
Expand Down
8 changes: 4 additions & 4 deletions src/sksl/codegen/SkSLRasterPipelineBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1422,12 +1422,13 @@ Program::SlotData Program::allocateSlotData(SkArenaAlloc* alloc) const {
return s;
}

#if !defined(SKSL_STANDALONE)

bool Program::appendStages(SkRasterPipeline* pipeline,
SkArenaAlloc* alloc,
RP::Callbacks* callbacks,
SkSpan<const float> uniforms) const {
#if defined(SKSL_STANDALONE)
return false;
#else
// Convert our Instruction list to an array of ProgramOps.
TArray<Stage> stages;
SlotData slotData = this->allocateSlotData(alloc);
Expand Down Expand Up @@ -1539,9 +1540,8 @@ bool Program::appendStages(SkRasterPipeline* pipeline,
}

return true;
}

#endif
}

void Program::makeStages(TArray<Stage>* pipeline,
SkArenaAlloc* alloc,
Expand Down
2 changes: 0 additions & 2 deletions src/sksl/codegen/SkSLRasterPipelineBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,10 @@ class Program {
DebugTracePriv* debugTrace);
~Program();

#if !defined(SKSL_STANDALONE)
bool appendStages(SkRasterPipeline* pipeline,
SkArenaAlloc* alloc,
Callbacks* callbacks,
SkSpan<const float> uniforms) const;
#endif

void dump(SkWStream* out) const;

Expand Down
6 changes: 3 additions & 3 deletions src/sksl/codegen/SkSLVMCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
* found in the LICENSE file.
*/

#include "include/core/SkTypes.h"
#include "src/sksl/codegen/SkSLVMCodeGenerator.h"

#if defined(SK_ENABLE_SKVM)

#include "include/core/SkBlendMode.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorType.h"
#include "include/core/SkPoint.h"
#include "include/core/SkSpan.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include "include/private/base/SkFloatingPoint.h"
#include "include/private/base/SkTArray.h"
Expand Down Expand Up @@ -72,8 +74,6 @@
#include <utility>
#include <vector>

#if defined(SK_ENABLE_SKVM)

using namespace skia_private;

namespace {
Expand Down
7 changes: 4 additions & 3 deletions src/sksl/codegen/SkSLVMCodeGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
#ifndef SKSL_VMGENERATOR
#define SKSL_VMGENERATOR

#include "src/core/SkVM.h"
#include "include/core/SkTypes.h"

#if defined(SK_ENABLE_SKVM)

#include "src/core/SkVM.h"
#include <cstddef>

template <typename T> class SkSpan;

#if defined(SK_ENABLE_SKVM)

namespace SkSL {

class FunctionDefinition;
Expand Down
7 changes: 4 additions & 3 deletions tests/SkVMTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
* found in the LICENSE file.
*/

#include "include/core/SkTypes.h"

#if defined(SK_ENABLE_SKVM)

#include "include/core/SkColorType.h"
#include "include/core/SkScalar.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkDebug.h"
#include "include/private/base/SkFloatingPoint.h"
#include "src/base/SkMSAN.h"
Expand All @@ -22,8 +25,6 @@
#include <initializer_list>
#include <vector>

#if defined(SK_ENABLE_SKVM)

template <typename Fn>
static void test_jit_and_interpreter(const skvm::Builder& b, Fn&& test) {
skvm::Program p = b.done();
Expand Down

0 comments on commit 3ab6d7d

Please sign in to comment.