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:
mtklein 2016-08-02 11:13:48 -07:00 committed by Commit bot
parent b1dd067128
commit 5dbd274846
4 changed files with 8 additions and 1 deletions

View File

@ -308,7 +308,9 @@ executable("fiddle") {
deps = [
":skia",
":skia.h",
":tool_utils",
]
testonly = true
}
template("test_lib") {

View File

@ -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.

View File

@ -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) {

View File

@ -7,6 +7,9 @@
#include <stdio.h>
#include <stdlib.h>
#include "SkForceLinking.h"
__SK_FORCE_IMAGE_DECODER_LINKING;
#include "fiddle_main.h"