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

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

Issue 1359833004: Stop supporting HW dither (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor Created 5 years, 3 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/GrPipelineBuilder.cpp ('k') | src/gpu/SkGpuDevice.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 2010 Google Inc. 2 * Copyright 2010 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 "GrTextContext.h" 8 #include "GrTextContext.h"
9 #include "GrBlurUtils.h" 9 #include "GrBlurUtils.h"
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 if (drawFilter && !drawFilter->filter(&runPaint, SkDrawFilter::kText_Typ e)) { 124 if (drawFilter && !drawFilter->filter(&runPaint, SkDrawFilter::kText_Typ e)) {
125 // A false return from filter() means we should abort the current dr aw. 125 // A false return from filter() means we should abort the current dr aw.
126 runPaint = skPaint; 126 runPaint = skPaint;
127 continue; 127 continue;
128 } 128 }
129 129
130 runPaint.setFlags(FilterTextFlags(fSurfaceProps, runPaint)); 130 runPaint.setFlags(FilterTextFlags(fSurfaceProps, runPaint));
131 131
132 GrPaint grPaint; 132 GrPaint grPaint;
133 if (!SkPaint2GrPaint(fContext, rt, runPaint, viewMatrix, true, &grPaint) ) { 133 if (!SkPaint2GrPaint(fContext, runPaint, viewMatrix, true, &grPaint)) {
134 return; 134 return;
135 } 135 }
136 136
137 switch (it.positioning()) { 137 switch (it.positioning()) {
138 case SkTextBlob::kDefault_Positioning: 138 case SkTextBlob::kDefault_Positioning:
139 this->drawText(dc, rt, clip, grPaint, runPaint, viewMatrix, (const c har *)it.glyphs(), 139 this->drawText(dc, rt, clip, grPaint, runPaint, viewMatrix, (const c har *)it.glyphs(),
140 textLen, x + offset.x(), y + offset.y(), clipBounds); 140 textLen, x + offset.x(), y + offset.y(), clipBounds);
141 break; 141 break;
142 case SkTextBlob::kHorizontal_Positioning: 142 case SkTextBlob::kHorizontal_Positioning:
143 this->drawPosText(dc, rt, clip, grPaint, runPaint, viewMatrix, (cons t char*)it.glyphs(), 143 this->drawPosText(dc, rt, clip, grPaint, runPaint, viewMatrix, (cons t char*)it.glyphs(),
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) { 269 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) {
270 scaler = (GrFontScaler*)auxData; 270 scaler = (GrFontScaler*)auxData;
271 } 271 }
272 if (nullptr == scaler) { 272 if (nullptr == scaler) {
273 scaler = new GrFontScaler(cache); 273 scaler = new GrFontScaler(cache);
274 cache->setAuxProc(GlyphCacheAuxProc, scaler); 274 cache->setAuxProc(GlyphCacheAuxProc, scaler);
275 } 275 }
276 276
277 return scaler; 277 return scaler;
278 } 278 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698