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

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

Issue 1011403004: BitmapTextBatch and BitmapTextBlob (Closed) Base URL: https://skia.googlesource.com/skia.git@dfpr_take_2
Patch Set: fix for segfault 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/GrContext.cpp ('k') | src/gpu/GrFontAtlasSizes.h » ('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 2013 Google Inc. 2 * Copyright 2013 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 "GrDistanceFieldTextContext.h" 8 #include "GrDistanceFieldTextContext.h"
9 #include "GrAtlas.h" 9 #include "GrAtlas.h"
10 #include "GrBitmapTextContext.h" 10 #include "GrBitmapTextContext.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 fVertexBounds.setLargestInverted(); 68 fVertexBounds.setLargestInverted();
69 } 69 }
70 70
71 GrDistanceFieldTextContext* GrDistanceFieldTextContext::Create(GrContext* contex t, 71 GrDistanceFieldTextContext* GrDistanceFieldTextContext::Create(GrContext* contex t,
72 SkGpuDevice* gpuD evice, 72 SkGpuDevice* gpuD evice,
73 const SkDevicePro perties& props, 73 const SkDevicePro perties& props,
74 bool enable) { 74 bool enable) {
75 GrDistanceFieldTextContext* textContext = SkNEW_ARGS(GrDistanceFieldTextCont ext, 75 GrDistanceFieldTextContext* textContext = SkNEW_ARGS(GrDistanceFieldTextCont ext,
76 (context, gpuDevice, pr ops, enable)); 76 (context, gpuDevice, pr ops, enable));
77 #ifdef USE_BITMAP_TEXTBLOBS
78 textContext->fFallbackTextContext = GrBitmapTextContextB::Create(context, gp uDevice, props);
79 #else
77 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu Device, props); 80 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu Device, props);
81 #endif
78 82
79 return textContext; 83 return textContext;
80 } 84 }
81 85
82 GrDistanceFieldTextContext::~GrDistanceFieldTextContext() { 86 GrDistanceFieldTextContext::~GrDistanceFieldTextContext() {
83 SkSafeSetNull(fGammaTexture); 87 SkSafeSetNull(fGammaTexture);
84 } 88 }
85 89
86 bool GrDistanceFieldTextContext::canDraw(const GrRenderTarget* rt, 90 bool GrDistanceFieldTextContext::canDraw(const GrRenderTarget* rt,
87 const GrClip& clip, 91 const GrClip& clip,
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 } 736 }
733 } 737 }
734 738
735 inline void GrDistanceFieldTextContext::finish() { 739 inline void GrDistanceFieldTextContext::finish() {
736 this->flush(); 740 this->flush();
737 fTotalVertexCount = 0; 741 fTotalVertexCount = 0;
738 742
739 GrTextContext::finish(); 743 GrTextContext::finish();
740 } 744 }
741 745
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrFontAtlasSizes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698