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

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

Issue 1050633002: Revert of BitmapTextBatch and BitmapTextBlob (Closed) Base URL: https://skia.googlesource.com/skia.git@dfpr_take_2
Patch Set: 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
80 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu Device, props); 77 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu Device, props);
81 #endif
82 78
83 return textContext; 79 return textContext;
84 } 80 }
85 81
86 GrDistanceFieldTextContext::~GrDistanceFieldTextContext() { 82 GrDistanceFieldTextContext::~GrDistanceFieldTextContext() {
87 SkSafeSetNull(fGammaTexture); 83 SkSafeSetNull(fGammaTexture);
88 } 84 }
89 85
90 bool GrDistanceFieldTextContext::canDraw(const GrRenderTarget* rt, 86 bool GrDistanceFieldTextContext::canDraw(const GrRenderTarget* rt,
91 const GrClip& clip, 87 const GrClip& clip,
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 } 732 }
737 } 733 }
738 734
739 inline void GrDistanceFieldTextContext::finish() { 735 inline void GrDistanceFieldTextContext::finish() {
740 this->flush(); 736 this->flush();
741 fTotalVertexCount = 0; 737 fTotalVertexCount = 0;
742 738
743 GrTextContext::finish(); 739 GrTextContext::finish();
744 } 740 }
745 741
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