gn: fix fiddle
- __SK_FORCE_IMAGE_DECODER_LINKING makes sure the PNG encoder is linked - updated path to make working with sample draw.cpp easier. No public API changes. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202353002 Review-Url: https://codereview.chromium.org/2202353002
This commit is contained in:
parent
b1dd067128
commit
5dbd274846
2
BUILD.gn
2
BUILD.gn
@ -308,7 +308,9 @@ executable("fiddle") {
|
||||
deps = [
|
||||
":skia",
|
||||
":skia.h",
|
||||
":tool_utils",
|
||||
]
|
||||
testonly = true
|
||||
}
|
||||
|
||||
template("test_lib") {
|
||||
|
@ -5,6 +5,8 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "SkTypes.h"
|
||||
|
||||
/**
|
||||
* This function's sole purpose is to trick the linker into not discarding
|
||||
* SkImageDecoder subclasses just because we do not directly call them.
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "fiddle_main.h"
|
||||
DrawOptions GetDrawOptions() {
|
||||
// path *should* be absolute.
|
||||
static const char path[] = "../../resources/color_wheel.png";
|
||||
static const char path[] = "resources/color_wheel.png";
|
||||
return DrawOptions(256, 256, true, true, true, true, path);
|
||||
}
|
||||
void draw(SkCanvas* canvas) {
|
||||
|
@ -7,6 +7,9 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "SkForceLinking.h"
|
||||
|
||||
__SK_FORCE_IMAGE_DECODER_LINKING;
|
||||
|
||||
#include "fiddle_main.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user