Mark precompiled data as constexpr.
This will move it to the .rodata section. Change-Id: I5a88cb198180a8e8e02fe506fe716df56034a39c Bug: chromium:1343014 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557899 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
437ae4e6ef
commit
c752f8490e
@ -1,4 +1,4 @@
|
||||
static uint8_t SKSL_INCLUDE_sksl_compute[] = {12,0,111,0,
|
||||
static constexpr uint8_t SKSL_INCLUDE_sksl_compute[] = {12,0,111,0,
|
||||
17,115,107,95,84,104,114,101,97,100,80,111,115,105,116,105,111,110,
|
||||
5,117,105,110,116,51,
|
||||
1,116,
|
||||
|
@ -1,4 +1,4 @@
|
||||
static uint8_t SKSL_INCLUDE_sksl_frag[] = {12,0,96,0,
|
||||
static constexpr uint8_t SKSL_INCLUDE_sksl_frag[] = {12,0,96,0,
|
||||
12,115,107,95,70,114,97,103,67,111,111,114,100,
|
||||
6,102,108,111,97,116,52,
|
||||
12,115,107,95,67,108,111,99,107,119,105,115,101,
|
||||
|
@ -1,4 +1,4 @@
|
||||
static uint8_t SKSL_INCLUDE_sksl_gpu[] = {12,0,197,8,
|
||||
static constexpr uint8_t SKSL_INCLUDE_sksl_gpu[] = {12,0,197,8,
|
||||
7,100,101,103,114,101,101,115,
|
||||
8,36,103,101,110,84,121,112,101,
|
||||
7,114,97,100,105,97,110,115,
|
||||
|
@ -1,4 +1,4 @@
|
||||
static uint8_t SKSL_INCLUDE_sksl_graphite_frag[] = {12,0,146,6,
|
||||
static constexpr uint8_t SKSL_INCLUDE_sksl_graphite_frag[] = {12,0,146,6,
|
||||
8,115,107,95,101,114,114,111,114,
|
||||
5,104,97,108,102,52,
|
||||
10,99,111,108,111,114,80,97,114,97,109,
|
||||
|
@ -1,4 +1,4 @@
|
||||
static uint8_t SKSL_INCLUDE_sksl_graphite_vert[] = {12,0,162,5,
|
||||
static constexpr uint8_t SKSL_INCLUDE_sksl_graphite_vert[] = {12,0,162,5,
|
||||
3,36,80,73,
|
||||
5,102,108,111,97,116,
|
||||
7,36,68,101,103,114,101,101,
|
||||
|
@ -1,4 +1,4 @@
|
||||
static uint8_t SKSL_INCLUDE_sksl_public[] = {12,0,227,3,
|
||||
static constexpr uint8_t SKSL_INCLUDE_sksl_public[] = {12,0,227,3,
|
||||
7,100,101,103,114,101,101,115,
|
||||
8,36,103,101,110,84,121,112,101,
|
||||
7,114,97,100,105,97,110,115,
|
||||
|
@ -1,4 +1,4 @@
|
||||
static uint8_t SKSL_INCLUDE_sksl_rt_shader[] = {12,0,20,0,
|
||||
static constexpr uint8_t SKSL_INCLUDE_sksl_rt_shader[] = {12,0,20,0,
|
||||
12,115,107,95,70,114,97,103,67,111,111,114,100,
|
||||
6,102,108,111,97,116,52,
|
||||
52,1,1,0,
|
||||
|
@ -1,4 +1,4 @@
|
||||
static uint8_t SKSL_INCLUDE_sksl_vert[] = {12,0,82,0,
|
||||
static constexpr uint8_t SKSL_INCLUDE_sksl_vert[] = {12,0,82,0,
|
||||
12,115,107,95,80,101,114,86,101,114,116,101,120,
|
||||
11,115,107,95,80,111,115,105,116,105,111,110,
|
||||
6,102,108,111,97,116,52,
|
||||
|
@ -119,7 +119,7 @@ ResultCode processCommand(const std::vector<std::string>& paths) {
|
||||
printf("error writing '%s'\n", outputPath.c_str());
|
||||
return ResultCode::kOutputError;
|
||||
}
|
||||
out.printf("static uint8_t SKSL_INCLUDE_%s[] = {", baseName.c_str());
|
||||
out.printf("static constexpr uint8_t SKSL_INCLUDE_%s[] = {", baseName.c_str());
|
||||
for (size_t i = 0; i < data.length(); ++i) {
|
||||
out.printf("%s%d,", dehydrator.prefixAtOffset(i), uint8_t(data[i]));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user