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

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

Issue 1082843002: Initial CL to add distance field support to GrAtlasTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@attryst2
Patch Set: windows warnigns Created 5 years, 8 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/GrDistanceFieldTextContext.cpp ('k') | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 7
8 #include "GrStencilAndCoverTextContext.h" 8 #include "GrStencilAndCoverTextContext.h"
9 #include "GrAtlasTextContext.h" 9 #include "GrAtlasTextContext.h"
10 #include "GrBitmapTextContext.h" 10 #include "GrBitmapTextContext.h"
(...skipping 18 matching lines...) Expand all
29 , fQueuedGlyphCount(0) 29 , fQueuedGlyphCount(0)
30 , fFallbackGlyphsIdx(kGlyphBufferSize) { 30 , fFallbackGlyphsIdx(kGlyphBufferSize) {
31 } 31 }
32 32
33 GrStencilAndCoverTextContext* 33 GrStencilAndCoverTextContext*
34 GrStencilAndCoverTextContext::Create(GrContext* context, SkGpuDevice* gpuDevice, 34 GrStencilAndCoverTextContext::Create(GrContext* context, SkGpuDevice* gpuDevice,
35 const SkDeviceProperties& props) { 35 const SkDeviceProperties& props) {
36 GrStencilAndCoverTextContext* textContext = SkNEW_ARGS(GrStencilAndCoverText Context, 36 GrStencilAndCoverTextContext* textContext = SkNEW_ARGS(GrStencilAndCoverText Context,
37 (context, gpuDevice, props)); 37 (context, gpuDevice, props));
38 #ifdef USE_BITMAP_TEXTBLOBS 38 #ifdef USE_BITMAP_TEXTBLOBS
39 textContext->fFallbackTextContext = GrAtlasTextContext::Create(context, gpuD evice, props); 39 textContext->fFallbackTextContext = GrAtlasTextContext::Create(context, gpuD evice, props,
40 false);
40 #else 41 #else
41 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu Device, props); 42 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu Device, props);
42 #endif 43 #endif
43 44
44 return textContext; 45 return textContext;
45 } 46 }
46 47
47 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() { 48 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() {
48 } 49 }
49 50
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 480
480 SkGlyphCache::AttachCache(fGlyphCache); 481 SkGlyphCache::AttachCache(fGlyphCache);
481 fGlyphCache = NULL; 482 fGlyphCache = NULL;
482 483
483 fPipelineBuilder.stencil()->setDisabled(); 484 fPipelineBuilder.stencil()->setDisabled();
484 fStateRestore.set(NULL); 485 fStateRestore.set(NULL);
485 fViewMatrix = fContextInitialMatrix; 486 fViewMatrix = fContextInitialMatrix;
486 GrTextContext::finish(); 487 GrTextContext::finish();
487 } 488 }
488 489
OLDNEW
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698