Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(545)

Side by Side Diff: src/gpu/GrAtlasTextContext.cpp

Issue 1137333004: fix for angle bot (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tests/GLProgramsTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "GrAtlasTextContext.h" 7 #include "GrAtlasTextContext.h"
8 8
9 #include "GrBatch.h" 9 #include "GrBatch.h"
10 #include "GrBatchFontCache.h" 10 #include "GrBatchFontCache.h"
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 // We enable distance fields by twiddling a knob on the paint 2227 // We enable distance fields by twiddling a knob on the paint
2228 gTextContext = GrAtlasTextContext::Create(context, NULL, gDeviceProperti es, false); 2228 gTextContext = GrAtlasTextContext::Create(context, NULL, gDeviceProperti es, false);
2229 } 2229 }
2230 2230
2231 // create dummy render target 2231 // create dummy render target
2232 GrSurfaceDesc desc; 2232 GrSurfaceDesc desc;
2233 desc.fFlags = kRenderTarget_GrSurfaceFlag; 2233 desc.fFlags = kRenderTarget_GrSurfaceFlag;
2234 desc.fWidth = 1024; 2234 desc.fWidth = 1024;
2235 desc.fHeight = 1024; 2235 desc.fHeight = 1024;
2236 desc.fConfig = kRGBA_8888_GrPixelConfig; 2236 desc.fConfig = kRGBA_8888_GrPixelConfig;
2237 desc.fSampleCnt = 1; 2237 desc.fSampleCnt = 0;
2238 SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(de sc, true, NULL, 0)); 2238 SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(de sc, true, NULL, 0));
2239 SkASSERT(texture); 2239 SkASSERT(texture);
2240 SkASSERT(NULL != texture->asRenderTarget()); 2240 SkASSERT(NULL != texture->asRenderTarget());
2241 GrRenderTarget* rt = texture->asRenderTarget(); 2241 GrRenderTarget* rt = texture->asRenderTarget();
2242 2242
2243 // Setup dummy SkPaint / GrPaint 2243 // Setup dummy SkPaint / GrPaint
2244 GrColor color = GrRandomColor(random); 2244 GrColor color = GrRandomColor(random);
2245 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); 2245 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
2246 SkPaint skPaint; 2246 SkPaint skPaint;
2247 skPaint.setDistanceFieldTextTEMP(random->nextBool()); 2247 skPaint.setDistanceFieldTextTEMP(random->nextBool());
(...skipping 20 matching lines...) Expand all
2268 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text, 2268 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text,
2269 static_cast<size_t>(textLen), 0, 0, noClip)); 2269 static_cast<size_t>(textLen), 0, 0, noClip));
2270 2270
2271 SkScalar transX = static_cast<SkScalar>(random->nextU()); 2271 SkScalar transX = static_cast<SkScalar>(random->nextU());
2272 SkScalar transY = static_cast<SkScalar>(random->nextU()); 2272 SkScalar transY = static_cast<SkScalar>(random->nextU());
2273 const GrAtlasTextContext::BitmapTextBlob::Run::SubRunInfo& info = blob->fRun s[0].fSubRunInfo[0]; 2273 const GrAtlasTextContext::BitmapTextBlob::Run::SubRunInfo& info = blob->fRun s[0].fSubRunInfo[0];
2274 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint); 2274 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint);
2275 } 2275 }
2276 2276
2277 #endif 2277 #endif
OLDNEW
« no previous file with comments | « no previous file | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698