From c34aa9d51a6d7b0426436e32750228964274f754 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Fri, 17 Nov 2017 14:59:43 -0500 Subject: Add Fiddle DrawOptions for the backend objects Change-Id: I720125f134394a8b923d6e883941d20715945d73 Reviewed-on: https://skia-review.googlesource.com/73340 Reviewed-by: Cary Clark Commit-Queue: Robert Phillips --- tools/fiddle/draw.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'tools/fiddle/draw.cpp') 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 tmp2 = SkSurface::MakeFromBackendTexture(context, backEndTextureRenderTarget, kTopLeft_GrSurfaceOrigin, 0, nullptr, nullptr); + // Note: this surface should only be renderable (i.e., not textureable) sk_sp tmp3 = SkSurface::MakeFromBackendRenderTarget(context, backEndRenderTarget, kTopLeft_GrSurfaceOrigin, nullptr, nullptr); - - sk_sp tmp4 = SkSurface::MakeFromBackendTextureAsRenderTarget( - context, - backEndTextureRenderTarget, - kTopLeft_GrSurfaceOrigin, - 0, nullptr, nullptr); } } -- cgit v1.2.3