diff options
author | joshualitt <joshualitt@google.com> | 2015-07-31 07:55:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-31 07:55:09 -0700 |
commit | bdc91a7fdb100da9321c1c17fae912949ccb60b2 (patch) | |
tree | 622deb8887694c291e7b5ec74d41abd2f211ae67 /tests/TextBlobCacheTest.cpp | |
parent | adcdca86ce425cf8c28bfad311cef028df756ee8 (diff) |
Revert of Modifying TextBlobCacheTest to use SkRandomScalerContext (patchset #3 id:40001 of https://codereview.chromium.org/1266003002/)
Reason for revert:
breaking android
Original issue's description:
> Modifying TextBlobCacheTest to use SkRandomScalerContext
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/adcdca86ce425cf8c28bfad311cef028df756ee8
TBR=bungeman@google.com,bsalomon@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1267623004
Diffstat (limited to 'tests/TextBlobCacheTest.cpp')
-rw-r--r-- | tests/TextBlobCacheTest.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/tests/TextBlobCacheTest.cpp b/tests/TextBlobCacheTest.cpp index c42ef89890..3cbc8a35ad 100644 --- a/tests/TextBlobCacheTest.cpp +++ b/tests/TextBlobCacheTest.cpp @@ -14,8 +14,6 @@ #include "SkGraphics.h" #include "SkSurface.h" #include "SkTypeface.h" -#include "../src/fonts/SkRandomScalerContext.h" -#include "../src/fonts/SkGScalerContext.h" #ifdef SK_BUILD_FOR_WIN #include "SkTypeface_win.h" @@ -61,8 +59,7 @@ DEF_GPUTEST(TextBlobCache, reporter, factory) { uint32_t flags = 0; SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); - // We don't typically actually draw with this unittest - GrContext* ctx = factory->get(GrContextFactory::kNull_GLContextType); + GrContext* ctx = factory->get(GrContextFactory::kNative_GLContextType); SkImageInfo info = SkImageInfo::Make(kWidth, kHeight, kN32_SkColorType, kPremul_SkAlphaType); SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(ctx, SkSurface::kNo_Budgeted, info, 0, &props)); @@ -97,10 +94,7 @@ DEF_GPUTEST(TextBlobCache, reporter, factory) { SkFontStyle fs; set->getStyle(j, &fs, NULL); - // We use a typeface which randomy returns unexpected mask formats to fuzz - SkAutoTUnref<SkTypeface> orig(set->createTypeface(j)); - SkAutoTUnref<SkTypeface> typeface(SkNEW_ARGS(SkRandomTypeface, (orig, paint, true))); - paint.setTypeface(typeface); + SkSafeUnref(paint.setTypeface(set->createTypeface(j))); SkTextBlobBuilder builder; for (int aa = 0; aa < 2; aa++) { @@ -109,9 +103,6 @@ DEF_GPUTEST(TextBlobCache, reporter, factory) { paint.setAntiAlias(SkToBool(aa)); paint.setSubpixelText(SkToBool(subpixel)); paint.setLCDRenderText(SkToBool(lcd)); - if (!SkToBool(lcd)) { - paint.setTextSize(160); - } const SkTextBlobBuilder::RunBuffer& run = builder.allocRun(paint, MAX_TOTAL_TEXT, 0, 0, |