diff options
author | 2016-02-08 09:10:47 -0800 | |
---|---|---|
committer | 2016-02-08 09:10:47 -0800 | |
commit | 13a036b7ebfd1faeef168979cd6dbb09d0868619 (patch) | |
tree | 969499662f9261f1fbb9cf5428a0f5fcb2c1dffd /dm | |
parent | 3c69348e725131150e4ab962dec1b3ff1148a6bd (diff) |
Test CodecImageGenerator on GPU bots
In crrev.com/1549473003, CodecImageGenerator implemented getYUV8Planes,
so that we can test on a GPU bot. Update the arguments to DM so that
we run CodecImageGenerator on GPU bots.
This is adapted from:
https://codereview.chromium.org/1663453002/
This will cause many untriaged images on Gold.
The GPU converts YUV->RGBA differently than we
do in software.
BUG=skia:4888
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1676663002
Review URL: https://codereview.chromium.org/1676663002
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DMSrcSink.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 9576f69d67..a0dcb1cfc5 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -855,6 +855,14 @@ Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) co const SkISize size = src.size(); const SkImageInfo info = SkImageInfo::Make(size.width(), size.height(), kN32_SkColorType, kPremul_SkAlphaType); +#if SK_SUPPORT_GPU + const int maxDimension = factory.getContextInfo(fContextType, fContextOptions). + fGrContext->caps()->maxTextureSize(); + if (maxDimension < SkTMax(size.width(), size.height())) { + return Error::Nonfatal("Src too large to create a texture.\n"); + } +#endif + SkAutoTUnref<SkSurface> surface( NewGpuSurface(&factory, fContextType, fContextOptions, info, fSampleCount, fUseDIText)); if (!surface) { |