fix for angle bot

TBR=
BUG=skia:

Review URL: https://codereview.chromium.org/1137333004
This commit is contained in:
joshualitt 2015-05-13 12:15:14 -07:00 committed by Commit bot
parent fc0725645c
commit 1573206f20
2 changed files with 5 additions and 4 deletions

View File

@ -2245,7 +2245,7 @@ BATCH_TEST_DEFINE(TextBlobBatch) {
desc.fWidth = 1024;
desc.fHeight = 1024;
desc.fConfig = kRGBA_8888_GrPixelConfig;
desc.fSampleCnt = 1;
desc.fSampleCnt = 0;
SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(desc, true, NULL, 0));
SkASSERT(texture);
SkASSERT(NULL != texture->asRenderTarget());

View File

@ -105,7 +105,8 @@ GrFragmentProcessor* BigKeyProcessor::TestCreate(SkRandom*,
static const int kRenderTargetHeight = 1;
static const int kRenderTargetWidth = 1;
static GrRenderTarget* random_render_target(GrContext* context, SkRandom* random) {
static GrRenderTarget* random_render_target(GrContext* context, SkRandom* random,
const GrDrawTargetCaps* caps) {
// setup render target
GrTextureParams params;
GrSurfaceDesc texDesc;
@ -115,7 +116,7 @@ static GrRenderTarget* random_render_target(GrContext* context, SkRandom* random
texDesc.fConfig = kRGBA_8888_GrPixelConfig;
texDesc.fOrigin = random->nextBool() == true ? kTopLeft_GrSurfaceOrigin :
kBottomLeft_GrSurfaceOrigin;
texDesc.fSampleCnt = random->nextBool() == true ? 4 : 0;
texDesc.fSampleCnt = random->nextBool() == true ? SkTMin(4, caps->maxSampleCount()) : 0;
GrUniqueKey key;
static const GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain();
@ -239,7 +240,7 @@ bool GrDrawTarget::programUnitTest(int maxStages) {
static const int NUM_TESTS = 2048;
for (int t = 0; t < NUM_TESTS; t++) {
// setup random render target(can fail)
SkAutoTUnref<GrRenderTarget> rt(random_render_target(fContext, &random));
SkAutoTUnref<GrRenderTarget> rt(random_render_target(fContext, &random, this->caps()));
if (!rt.get()) {
SkDebugf("Could not allocate render target");
return false;