diff options
author | Robert Phillips <robertphillips@google.com> | 2017-11-17 14:59:43 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-27 17:22:26 +0000 |
commit | c34aa9d51a6d7b0426436e32750228964274f754 (patch) | |
tree | c1c0fd28746701868d34452f4fae1e4239026533 /tools/fiddle/draw.cpp | |
parent | c82dd4e2cff30453f0dce4dfba9dc912321ba7bd (diff) |
Add Fiddle DrawOptions for the backend objects
Change-Id: I720125f134394a8b923d6e883941d20715945d73
Reviewed-on: https://skia-review.googlesource.com/73340
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools/fiddle/draw.cpp')
-rw-r--r-- | tools/fiddle/draw.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tools/fiddle/draw.cpp b/tools/fiddle/draw.cpp index 31aa9d0a81..346d1caf59 100644 --- a/tools/fiddle/draw.cpp +++ b/tools/fiddle/draw.cpp @@ -13,7 +13,8 @@ DrawOptions GetDrawOptions() { // path *should* be absolute. static const char path[] = "resources/color_wheel.png"; - return DrawOptions(256, 256, true, true, true, true, true, false, false, path); + return DrawOptions(256, 256, true, true, true, true, true, false, false, path, + GrMipMapped::kYes, 64, 64, 0, GrMipMapped::kYes); } void draw(SkCanvas* canvas) { canvas->clear(SK_ColorWHITE); @@ -35,21 +36,17 @@ void draw(SkCanvas* canvas) { kOpaque_SkAlphaType, nullptr); + // TODO: this sampleCnt parameter here should match that set in the options! sk_sp<SkSurface> tmp2 = SkSurface::MakeFromBackendTexture(context, backEndTextureRenderTarget, kTopLeft_GrSurfaceOrigin, 0, nullptr, nullptr); + // Note: this surface should only be renderable (i.e., not textureable) sk_sp<SkSurface> tmp3 = SkSurface::MakeFromBackendRenderTarget(context, backEndRenderTarget, kTopLeft_GrSurfaceOrigin, nullptr, nullptr); - - sk_sp<SkSurface> tmp4 = SkSurface::MakeFromBackendTextureAsRenderTarget( - context, - backEndTextureRenderTarget, - kTopLeft_GrSurfaceOrigin, - 0, nullptr, nullptr); } } |