f0da138c95
also, test building fiddle_main.cpp & draw.cpp GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1895143002 Review URL: https://codereview.chromium.org/1895143002
46 lines
992 B
C
46 lines
992 B
C
/*
|
|
* Copyright 2015 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#ifndef fiddle_main_DEFINED
|
|
#define fiddle_main_DEFINED
|
|
|
|
#ifdef FIDDLE_BUILD_TEST
|
|
#include "GrContext.h"
|
|
#include "SkCanvas.h"
|
|
#include "SkDocument.h"
|
|
#include "SkPictureRecorder.h"
|
|
#include "SkStream.h"
|
|
#include "SkSurface.h"
|
|
#include "gl/GrGLAssembleInterface.h"
|
|
#include "gl/GrGLInterface.h"
|
|
#else
|
|
#include "skia.h"
|
|
#endif
|
|
|
|
extern SkBitmap source;
|
|
extern sk_sp<SkImage> image;
|
|
|
|
struct DrawOptions {
|
|
DrawOptions(int w, int h, bool r, bool g, bool p, bool k, const char* s)
|
|
: size(SkISize::Make(w, h))
|
|
, raster(r)
|
|
, gpu(g)
|
|
, pdf(p)
|
|
, skp(k)
|
|
, source(s) {}
|
|
SkISize size;
|
|
bool raster;
|
|
bool gpu;
|
|
bool pdf;
|
|
bool skp;
|
|
const char* source;
|
|
};
|
|
|
|
extern DrawOptions GetDrawOptions();
|
|
extern void draw(SkCanvas*);
|
|
|
|
#endif // fiddle_main_DEFINED
|