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

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

Issue 2186073002: Rename GrContext's newDrawContext & drawContext to makeDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/image/SkImage_Gpu.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 "GrContext.h" 9 #include "GrContext.h"
10 #include "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 static SkSurfaceProps gSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType ); 382 static SkSurfaceProps gSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType );
383 383
384 if (context->uniqueID() != gContextID) { 384 if (context->uniqueID() != gContextID) {
385 gContextID = context->uniqueID(); 385 gContextID = context->uniqueID();
386 delete gTextContext; 386 delete gTextContext;
387 387
388 gTextContext = GrAtlasTextContext::Create(); 388 gTextContext = GrAtlasTextContext::Create();
389 } 389 }
390 390
391 // Setup dummy SkPaint / GrPaint / GrDrawContext 391 // Setup dummy SkPaint / GrPaint / GrDrawContext
392 sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kAppr ox, 1024, 1024, 392 sk_sp<GrDrawContext> drawContext(context->makeDrawContext(SkBackingFit::kApp rox, 1024, 1024,
393 kSkia8888_GrPixelCo nfig, nullptr)); 393 kSkia8888_GrPixelC onfig, nullptr));
394 394
395 GrColor color = GrRandomColor(random); 395 GrColor color = GrRandomColor(random);
396 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); 396 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
397 SkPaint skPaint; 397 SkPaint skPaint;
398 skPaint.setColor(color); 398 skPaint.setColor(color);
399 skPaint.setLCDRenderText(random->nextBool()); 399 skPaint.setLCDRenderText(random->nextBool());
400 skPaint.setAntiAlias(skPaint.isLCDRenderText() ? true : random->nextBool()); 400 skPaint.setAntiAlias(skPaint.isLCDRenderText() ? true : random->nextBool());
401 skPaint.setSubpixelText(random->nextBool()); 401 skPaint.setSubpixelText(random->nextBool());
402 402
403 GrPaint grPaint; 403 GrPaint grPaint;
(...skipping 23 matching lines...) Expand all
427 viewMatrix, 427 viewMatrix,
428 gSurfaceProps, text, 428 gSurfaceProps, text,
429 static_cast<size_t>(textLen), x, y)); 429 static_cast<size_t>(textLen), x, y));
430 430
431 return blob->test_createBatch(textLen, 0, 0, viewMatrix, x, y, color, skPain t, 431 return blob->test_createBatch(textLen, 0, 0, viewMatrix, x, y, color, skPain t,
432 gSurfaceProps, gTextContext->dfAdjustTable(), 432 gSurfaceProps, gTextContext->dfAdjustTable(),
433 context->getBatchFontCache()); 433 context->getBatchFontCache());
434 } 434 }
435 435
436 #endif 436 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698