diff options
author | Mike Reed <reed@google.com> | 2018-01-02 15:40:29 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-02 21:06:41 +0000 |
commit | 46596ae50559e89a0a2462573ac9448cf309cf56 (patch) | |
tree | bc515e91123b6d0d14f7873c4ab7ce2d22b41bcc | |
parent | 99b504018b31d63566995b3fc114c940ed4749c4 (diff) |
use tool_utils to encapsulate checking for recording canvas and makeSurface
Bug: skia:
Change-Id: Ia93ee09dd213b8d6ad5c18e887add5ff3448c824
Reviewed-on: https://skia-review.googlesource.com/90243
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
-rw-r--r-- | gm/bleed.cpp | 13 | ||||
-rw-r--r-- | gm/complexclip_blur_tiled.cpp | 6 | ||||
-rw-r--r-- | gm/drawatlas.cpp | 6 | ||||
-rw-r--r-- | gm/drawatlascolor.cpp | 5 | ||||
-rw-r--r-- | gm/drawbitmaprect.cpp | 7 | ||||
-rw-r--r-- | gm/drawminibitmaprect.cpp | 6 | ||||
-rw-r--r-- | gm/imagealphathreshold.cpp | 8 | ||||
-rw-r--r-- | gm/imageblurclampmode.cpp | 10 | ||||
-rw-r--r-- | gm/imageblurrepeatmode.cpp | 10 | ||||
-rw-r--r-- | gm/imagefilters.cpp | 6 | ||||
-rw-r--r-- | gm/imagemakewithfilter.cpp | 5 | ||||
-rw-r--r-- | gm/lattice.cpp | 8 | ||||
-rw-r--r-- | gm/lcdblendmodes.cpp | 5 | ||||
-rw-r--r-- | gm/localmatriximagefilter.cpp | 6 | ||||
-rw-r--r-- | gm/localmatriximageshader.cpp | 6 | ||||
-rw-r--r-- | gm/multipicturedraw.cpp | 7 | ||||
-rw-r--r-- | gm/ninepatchstretch.cpp | 7 | ||||
-rw-r--r-- | gm/perspshaders.cpp | 6 | ||||
-rw-r--r-- | gm/surface.cpp | 16 | ||||
-rw-r--r-- | gm/textblobgeometrychange.cpp | 5 | ||||
-rw-r--r-- | gm/textblobrandomfont.cpp | 2 | ||||
-rw-r--r-- | tools/sk_tool_utils.cpp | 10 | ||||
-rw-r--r-- | tools/sk_tool_utils.h | 6 |
23 files changed, 50 insertions, 116 deletions
diff --git a/gm/bleed.cpp b/gm/bleed.cpp index 1bb8b2b029..b6ee10b555 100644 --- a/gm/bleed.cpp +++ b/gm/bleed.cpp @@ -13,6 +13,7 @@ #include "SkImage.h" #include "SkTDArray.h" #include "SkUtils.h" +#include "sk_tool_utils.h" #if SK_SUPPORT_GPU #include "GrContext.h" @@ -449,14 +450,6 @@ DEF_GM( return new BleedGM(kUseAlphaImageShader_BleedTest); ) /////////////////////////////////////////////////////////////////////////////////////////////////// #include "SkSurface.h" -sk_sp<SkSurface> make_surface(SkCanvas* canvas, const SkImageInfo& info) { - auto surface = canvas->makeSurface(info); - if (!surface) { - surface = SkSurface::MakeRaster(info); - } - return surface; -} - // Construct an image and return the inner "src" rect. Build the image such that the interior is // blue, with a margin of blue (2px) but then an outer margin of red. // @@ -468,7 +461,7 @@ static sk_sp<SkImage> make_image(SkCanvas* canvas, SkRect* srcR) { // produce different mipmap filtering when we have an odd sized texture. const int N = 10 + 2 + 8 + 2 + 10; SkImageInfo info = SkImageInfo::MakeN32Premul(N, N); - auto surface = make_surface(canvas, info); + auto surface = sk_tool_utils::makeSurface(canvas, info); SkCanvas* c = surface->getCanvas(); SkRect r = SkRect::MakeIWH(info.width(), info.height()); SkPaint paint; @@ -500,7 +493,7 @@ DEF_SIMPLE_GM(bleed_downscale, canvas, 360, 240) { canvas->save(); for (auto quality : qualities) { paint.setFilterQuality(quality); - auto surf = make_surface(canvas, SkImageInfo::MakeN32Premul(1, 1)); + auto surf = sk_tool_utils::makeSurface(canvas, SkImageInfo::MakeN32Premul(1, 1)); surf->getCanvas()->drawImageRect(img, src, SkRect::MakeWH(1, 1), &paint, constraint); // now blow up the 1 pixel result canvas->drawImageRect(surf->makeImageSnapshot(), SkRect::MakeWH(100, 100), nullptr); diff --git a/gm/complexclip_blur_tiled.cpp b/gm/complexclip_blur_tiled.cpp index b2b206133e..47234da55f 100644 --- a/gm/complexclip_blur_tiled.cpp +++ b/gm/complexclip_blur_tiled.cpp @@ -10,6 +10,7 @@ #include "SkRRect.h" #include "SkSurface.h" #include "SkClipOpPriv.h" +#include "sk_tool_utils.h" #define WIDTH 512 #define HEIGHT 512 @@ -37,10 +38,7 @@ protected: SkRect bounds = canvas->getLocalClipBounds(); int ts = SkScalarCeilToInt(tileSize); SkImageInfo info = SkImageInfo::MakeN32Premul(ts, ts); - auto tileSurface(canvas->makeSurface(info)); - if (!tileSurface) { - tileSurface = SkSurface::MakeRaster(info); - } + auto tileSurface(sk_tool_utils::makeSurface(canvas, info)); SkCanvas* tileCanvas = tileSurface->getCanvas(); for (SkScalar y = bounds.top(); y < bounds.bottom(); y += tileSize) { for (SkScalar x = bounds.left(); x < bounds.right(); x += tileSize) { diff --git a/gm/drawatlas.cpp b/gm/drawatlas.cpp index 4a23e26527..afb197eeef 100644 --- a/gm/drawatlas.cpp +++ b/gm/drawatlas.cpp @@ -11,14 +11,12 @@ #include "SkCanvas.h" #include "SkRSXform.h" #include "SkSurface.h" +#include "sk_tool_utils.h" class DrawAtlasGM : public skiagm::GM { static sk_sp<SkImage> MakeAtlas(SkCanvas* caller, const SkRect& target) { SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100); - auto surface(caller->makeSurface(info)); - if (nullptr == surface) { - surface = SkSurface::MakeRaster(info); - } + auto surface(sk_tool_utils::makeSurface(caller, info)); SkCanvas* canvas = surface->getCanvas(); // draw red everywhere, but we don't expect to see it in the draw, testing the notion // that drawAtlas draws a subset-region of the atlas. diff --git a/gm/drawatlascolor.cpp b/gm/drawatlascolor.cpp index 548641b354..8d53e31425 100644 --- a/gm/drawatlascolor.cpp +++ b/gm/drawatlascolor.cpp @@ -20,10 +20,7 @@ static sk_sp<SkImage> make_atlas(SkCanvas* caller, int atlasSize) { const int kBlockSize = atlasSize/2; SkImageInfo info = SkImageInfo::MakeN32Premul(atlasSize, atlasSize); - auto surface(caller->makeSurface(info)); - if (nullptr == surface) { - surface = SkSurface::MakeRaster(info); - } + auto surface(sk_tool_utils::makeSurface(caller, info)); SkCanvas* canvas = surface->getCanvas(); SkPaint paint; diff --git a/gm/drawbitmaprect.cpp b/gm/drawbitmaprect.cpp index 2cd1b2f93e..200a3971e8 100644 --- a/gm/drawbitmaprect.cpp +++ b/gm/drawbitmaprect.cpp @@ -35,12 +35,7 @@ static SkBitmap make_chessbm(int w, int h) { static sk_sp<SkImage> makebm(SkCanvas* origCanvas, SkBitmap* resultBM, int w, int h) { SkImageInfo info = SkImageInfo::MakeN32Premul(w, h); - auto surface(origCanvas->makeSurface(info)); - if (nullptr == surface) { - // picture canvas will return null, so fall-back to raster - surface = SkSurface::MakeRaster(info); - } - + auto surface(sk_tool_utils::makeSurface(origCanvas, info)); SkCanvas* canvas = surface->getCanvas(); canvas->clear(SK_ColorTRANSPARENT); diff --git a/gm/drawminibitmaprect.cpp b/gm/drawminibitmaprect.cpp index 4a1417ce29..b463d0614f 100644 --- a/gm/drawminibitmaprect.cpp +++ b/gm/drawminibitmaprect.cpp @@ -13,13 +13,11 @@ #include "SkRandom.h" #include "SkShader.h" #include "SkSurface.h" +#include "sk_tool_utils.h" static sk_sp<SkImage> makebm(SkCanvas* caller, int w, int h) { SkImageInfo info = SkImageInfo::MakeN32Premul(w, h); - auto surface(caller->makeSurface(info)); - if (nullptr == surface) { - surface = SkSurface::MakeRaster(info); - } + auto surface(sk_tool_utils::makeSurface(caller, info)); SkCanvas* canvas = surface->getCanvas(); const SkScalar wScalar = SkIntToScalar(w); diff --git a/gm/imagealphathreshold.cpp b/gm/imagealphathreshold.cpp index 6d01722d0a..3783bfcb3a 100644 --- a/gm/imagealphathreshold.cpp +++ b/gm/imagealphathreshold.cpp @@ -12,6 +12,7 @@ #include "SkRandom.h" #include "SkRegion.h" #include "SkSurface.h" +#include "sk_tool_utils.h" #define WIDTH 500 #define HEIGHT 500 @@ -101,12 +102,7 @@ static sk_sp<SkSurface> make_color_matching_surface(SkCanvas* canvas, int width, SkImageInfo info = SkImageInfo::Make(width, height, ct, alphaType, std::move(cs)); - sk_sp<SkSurface> result = canvas->makeSurface(info); - if (!result) { - result = SkSurface::MakeRaster(info); - } - - return result; + return sk_tool_utils::makeSurface(canvas, info); } class ImageAlphaThresholdSurfaceGM : public skiagm::GM { diff --git a/gm/imageblurclampmode.cpp b/gm/imageblurclampmode.cpp index f0cad82ce7..51109c5cff 100644 --- a/gm/imageblurclampmode.cpp +++ b/gm/imageblurclampmode.cpp @@ -10,17 +10,9 @@ #include "SkSurface.h" #include "SkBlurImageFilter.h" -static sk_sp<SkSurface> make_surface(SkCanvas* canvas, const SkImageInfo& info) { - auto surface = canvas->makeSurface(info); - if (!surface) { - surface = SkSurface::MakeRaster(info); - } - return surface; -} - static sk_sp<SkImage> make_image(SkCanvas* canvas) { SkImageInfo info = SkImageInfo::MakeN32Premul(250, 200); - auto surface = make_surface(canvas, info); + auto surface = sk_tool_utils::makeSurface(canvas, info); SkCanvas* c = surface->getCanvas(); SkPaint paint; paint.setAntiAlias(true); diff --git a/gm/imageblurrepeatmode.cpp b/gm/imageblurrepeatmode.cpp index 6f38029e71..b7705bec04 100644 --- a/gm/imageblurrepeatmode.cpp +++ b/gm/imageblurrepeatmode.cpp @@ -10,17 +10,9 @@ #include "SkSurface.h" #include "SkBlurImageFilter.h" -static sk_sp<SkSurface> make_surface(SkCanvas* canvas, const SkImageInfo& info) { - auto surface = canvas->makeSurface(info); - if (!surface) { - surface = SkSurface::MakeRaster(info); - } - return surface; -} - static sk_sp<SkImage> make_image(SkCanvas* canvas, int direction) { SkImageInfo info = SkImageInfo::MakeN32Premul(250, 200); - auto surface = make_surface(canvas, info); + auto surface = sk_tool_utils::makeSurface(canvas, info); SkCanvas* c = surface->getCanvas(); SkPaint paint; paint.setAntiAlias(true); diff --git a/gm/imagefilters.cpp b/gm/imagefilters.cpp index 146388f331..bc33a57e8f 100644 --- a/gm/imagefilters.cpp +++ b/gm/imagefilters.cpp @@ -11,6 +11,7 @@ #include "SkImage.h" #include "SkImageFilter.h" #include "SkSurface.h" +#include "sk_tool_utils.h" /** * Test drawing a primitive w/ an imagefilter (in this case, just matrix w/ identity) to see @@ -69,10 +70,7 @@ DEF_SIMPLE_GM(imagefilters_xfermodes, canvas, 480, 480) { static sk_sp<SkImage> make_image(SkCanvas* canvas) { const SkImageInfo info = SkImageInfo::MakeS32(100, 100, kPremul_SkAlphaType); - auto surface(canvas->makeSurface(info)); - if (!surface) { - surface = SkSurface::MakeRaster(info); - } + auto surface(sk_tool_utils::makeSurface(canvas, info)); surface->getCanvas()->drawRect(SkRect::MakeXYWH(25, 25, 50, 50), SkPaint()); return surface->makeImageSnapshot(); } diff --git a/gm/imagemakewithfilter.cpp b/gm/imagemakewithfilter.cpp index 9c6e870a85..9805a0ba09 100644 --- a/gm/imagemakewithfilter.cpp +++ b/gm/imagemakewithfilter.cpp @@ -70,10 +70,7 @@ protected: canvas->translate(MARGIN, MARGIN); - sk_sp<SkSurface> surface = canvas->makeSurface(info); - if (!surface) { - surface = SkSurface::MakeRaster(info); - } + sk_sp<SkSurface> surface = sk_tool_utils::makeSurface(canvas, info); sk_tool_utils::draw_checkerboard(surface->getCanvas()); sk_sp<SkImage> source = surface->makeImageSnapshot(); diff --git a/gm/lattice.cpp b/gm/lattice.cpp index d5e2b45c6e..b2809105bc 100644 --- a/gm/lattice.cpp +++ b/gm/lattice.cpp @@ -7,16 +7,12 @@ #include "gm.h" #include "SkSurface.h" +#include "sk_tool_utils.h" static sk_sp<SkSurface> make_surface(SkCanvas* root, int N, int padLeft, int padTop, int padRight, int padBottom) { SkImageInfo info = SkImageInfo::MakeN32Premul(N + padLeft + padRight, N + padTop + padBottom); - auto surface = root->makeSurface(info); - if (!surface) { - surface = SkSurface::MakeRaster(info); - } - - return surface; + return sk_tool_utils::makeSurface(root, info); } static sk_sp<SkImage> make_image(SkCanvas* root, int* xDivs, int* yDivs, int padLeft, int padTop, diff --git a/gm/lcdblendmodes.cpp b/gm/lcdblendmodes.cpp index 1345d23762..1627654ffc 100644 --- a/gm/lcdblendmodes.cpp +++ b/gm/lcdblendmodes.cpp @@ -62,10 +62,7 @@ protected: canvas->drawRect(r, p); SkImageInfo info = SkImageInfo::MakeN32Premul(kWidth, kHeight); - auto surface(canvas->makeSurface(info)); - if (nullptr == surface) { - surface = SkSurface::MakeRaster(info); - } + auto surface(sk_tool_utils::makeSurface(canvas, info)); SkCanvas* surfCanvas = surface->getCanvas(); this->drawColumn(surfCanvas, SK_ColorBLACK, SK_ColorWHITE, false); diff --git a/gm/localmatriximagefilter.cpp b/gm/localmatriximagefilter.cpp index 14bbd32b84..8280c07b02 100644 --- a/gm/localmatriximagefilter.cpp +++ b/gm/localmatriximagefilter.cpp @@ -13,13 +13,11 @@ #include "SkMorphologyImageFilter.h" #include "SkOffsetImageFilter.h" #include "SkSurface.h" +#include "sk_tool_utils.h" static sk_sp<SkImage> make_image(SkCanvas* rootCanvas) { SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100); - auto surface(rootCanvas->makeSurface(info)); - if (!surface) { - surface = SkSurface::MakeRaster(info); - } + auto surface(sk_tool_utils::makeSurface(rootCanvas, info)); SkPaint paint; paint.setAntiAlias(true); diff --git a/gm/localmatriximageshader.cpp b/gm/localmatriximageshader.cpp index f63497de83..39f5908e61 100644 --- a/gm/localmatriximageshader.cpp +++ b/gm/localmatriximageshader.cpp @@ -8,13 +8,11 @@ #include "gm.h" #include "SkCanvas.h" #include "SkSurface.h" +#include "sk_tool_utils.h" static sk_sp<SkImage> make_image(SkCanvas* rootCanvas, SkColor color) { SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100); - auto surface(rootCanvas->makeSurface(info)); - if (!surface) { - surface = SkSurface::MakeRaster(info); - } + auto surface(sk_tool_utils::makeSurface(rootCanvas, info)); SkPaint paint; paint.setAntiAlias(true); diff --git a/gm/multipicturedraw.cpp b/gm/multipicturedraw.cpp index b18fb8a53b..4dd0139cd2 100644 --- a/gm/multipicturedraw.cpp +++ b/gm/multipicturedraw.cpp @@ -241,12 +241,7 @@ static sk_sp<SkPicture> make_sierpinski_picture() { static sk_sp<SkSurface> create_compat_surface(SkCanvas* canvas, int width, int height) { SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); - auto surface = canvas->makeSurface(info); - if (nullptr == surface) { - // picture canvas returns nullptr so fall back to raster - surface = SkSurface::MakeRaster(info); - } - return surface; + return sk_tool_utils::makeSurface(canvas, info); } // This class stores the information required to compose all the result diff --git a/gm/ninepatchstretch.cpp b/gm/ninepatchstretch.cpp index 90a02161ef..c905cee803 100644 --- a/gm/ninepatchstretch.cpp +++ b/gm/ninepatchstretch.cpp @@ -7,14 +7,11 @@ #include "gm.h" #include "SkSurface.h" +#include "sk_tool_utils.h" static sk_sp<SkSurface> make_surface(SkCanvas* root, int N) { SkImageInfo info = SkImageInfo::MakeN32Premul(N, N); - auto surface = root->makeSurface(info); - if (!surface) { - surface = SkSurface::MakeRaster(info); - } - return surface; + return sk_tool_utils::makeSurface(root, info); } static sk_sp<SkImage> make_image(SkCanvas* root, SkIRect* center) { diff --git a/gm/perspshaders.cpp b/gm/perspshaders.cpp index e39a846b1a..dd1a15a79b 100644 --- a/gm/perspshaders.cpp +++ b/gm/perspshaders.cpp @@ -11,13 +11,11 @@ #include "SkImage.h" #include "SkPath.h" #include "SkSurface.h" +#include "sk_tool_utils.h" static sk_sp<SkImage> make_image(SkCanvas* origCanvas, int w, int h) { SkImageInfo info = SkImageInfo::MakeN32Premul(w, h); - auto surface(origCanvas->makeSurface(info)); - if (nullptr == surface) { - surface = SkSurface::MakeRaster(info); - } + auto surface(sk_tool_utils::makeSurface(origCanvas, info)); SkCanvas* canvas = surface->getCanvas(); sk_tool_utils::draw_checkerboard(canvas, SK_ColorRED, SK_ColorGREEN, w/10); diff --git a/gm/surface.cpp b/gm/surface.cpp index 4b400caa44..30a7844742 100644 --- a/gm/surface.cpp +++ b/gm/surface.cpp @@ -124,10 +124,7 @@ protected: void onDraw(SkCanvas* canvas) override { SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100); - auto surf(canvas->makeSurface(info, nullptr)); - if (!surf) { - surf = SkSurface::MakeRaster(info); - } + auto surf(sk_tool_utils::makeSurface(canvas, info, nullptr)); drawInto(surf->getCanvas()); sk_sp<SkImage> image(surf->makeImageSnapshot()); @@ -152,10 +149,7 @@ DEF_GM( return new NewSurfaceGM ) DEF_SIMPLE_GM(copy_on_write_retain, canvas, 256, 256) { const SkImageInfo info = SkImageInfo::MakeN32Premul(256, 256); - sk_sp<SkSurface> surf = canvas->makeSurface(info, nullptr); - if (!surf) { - surf = SkSurface::MakeRaster(info, nullptr); - } + sk_sp<SkSurface> surf = sk_tool_utils::makeSurface(canvas, info); surf->getCanvas()->clear(SK_ColorRED); // its important that image survives longer than the next draw, so the surface will see @@ -173,11 +167,7 @@ DEF_SIMPLE_GM(copy_on_write_retain, canvas, 256, 256) { DEF_SIMPLE_GM(copy_on_write_savelayer, canvas, 256, 256) { const SkImageInfo info = SkImageInfo::MakeN32Premul(256, 256); - sk_sp<SkSurface> surf = canvas->makeSurface(info, nullptr); - if (!surf) { - surf = SkSurface::MakeRaster(info, nullptr); - } - + sk_sp<SkSurface> surf = sk_tool_utils::makeSurface(canvas, info); surf->getCanvas()->clear(SK_ColorRED); // its important that image survives longer than the next draw, so the surface will see // an outstanding image, and have to decide if it should retain or discard those pixels diff --git a/gm/textblobgeometrychange.cpp b/gm/textblobgeometrychange.cpp index b86ee3a17e..57f3962817 100644 --- a/gm/textblobgeometrychange.cpp +++ b/gm/textblobgeometrychange.cpp @@ -45,10 +45,7 @@ protected: SkImageInfo info = SkImageInfo::MakeN32Premul(200, 200); SkSurfaceProps props(0, kUnknown_SkPixelGeometry); - auto surface = canvas->makeSurface(info, &props); - if (!surface) { - surface = SkSurface::MakeRaster(info, &props); - } + auto surface = sk_tool_utils::makeSurface(canvas, info, &props); SkCanvas* c = surface->getCanvas(); // LCD text on white background diff --git a/gm/textblobrandomfont.cpp b/gm/textblobrandomfont.cpp index e4fbcfa962..2e6468a6fc 100644 --- a/gm/textblobrandomfont.cpp +++ b/gm/textblobrandomfont.cpp @@ -99,7 +99,7 @@ protected: kPremul_SkAlphaType, canvas->imageInfo().refColorSpace()); SkSurfaceProps props(0, kUnknown_SkPixelGeometry); - auto surface(canvas->makeSurface(info, &props)); + auto surface(sk_tool_utils::makeSurface(canvas, info, &props)); if (surface) { SkPaint paint; paint.setAntiAlias(true); diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp index bbb00bc123..9d1b4df56c 100644 --- a/tools/sk_tool_utils.cpp +++ b/tools/sk_tool_utils.cpp @@ -18,6 +18,7 @@ #include "SkPM4f.h" #include "SkPoint3.h" #include "SkShader.h" +#include "SkSurface.h" #include "SkTestScalerContext.h" #include "SkTextBlob.h" @@ -559,4 +560,13 @@ void copy_to_g8(SkBitmap* dst, const SkBitmap& src) { return a->peekPixels(&pm0) && b->peekPixels(&pm1) && equal_pixels(pm0, pm1, maxDiff, respectColorSpaces); } + + sk_sp<SkSurface> makeSurface(SkCanvas* canvas, const SkImageInfo& info, + const SkSurfaceProps* props) { + auto surf = canvas->makeSurface(info, props); + if (!surf) { + surf = SkSurface::MakeRaster(info, props); + } + return surf; + } } // namespace sk_tool_utils diff --git a/tools/sk_tool_utils.h b/tools/sk_tool_utils.h index 0741b19644..9081e3c56f 100644 --- a/tools/sk_tool_utils.h +++ b/tools/sk_tool_utils.h @@ -24,6 +24,8 @@ class SkPaint; class SkPath; class SkRRect; class SkShader; +class SkSurface; +class SkSurfaceProps; class SkTestFont; class SkTextBlobBuilder; @@ -112,6 +114,9 @@ namespace sk_tool_utils { SkBitmap create_string_bitmap(int w, int h, SkColor c, int x, int y, int textSize, const char* str); + // If the canvas does't make a surface (e.g. recording), make a raster surface + sk_sp<SkSurface> makeSurface(SkCanvas*, const SkImageInfo&, const SkSurfaceProps* = nullptr); + // A helper for inserting a drawtext call into a SkTextBlobBuilder void add_to_text_blob_w_len(SkTextBlobBuilder* builder, const char* text, size_t len, const SkPaint& origPaint, SkScalar x, SkScalar y); @@ -245,7 +250,6 @@ namespace sk_tool_utils { bool copy_to(SkBitmap* dst, SkColorType dstCT, const SkBitmap& src); void copy_to_g8(SkBitmap* dst, const SkBitmap& src); - } // namespace sk_tool_utils #endif // sk_tool_utils_DEFINED |