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

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

Issue 1216973004: Hide NVPR text behind distance field flag (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | 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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrAARectRenderer.h" 9 #include "GrAARectRenderer.h"
10 #include "GrAtlasTextContext.h" 10 #include "GrAtlasTextContext.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 if (!this->prepareToDraw(dst)) { 51 if (!this->prepareToDraw(dst)) {
52 return; 52 return;
53 } 53 }
54 54
55 fDrawTarget->copySurface(dst, src, srcRect, dstPoint); 55 fDrawTarget->copySurface(dst, src, srcRect, dstPoint);
56 } 56 }
57 57
58 GrTextContext* GrDrawContext::createTextContext(GrRenderTarget* renderTarget, 58 GrTextContext* GrDrawContext::createTextContext(GrRenderTarget* renderTarget,
59 const SkSurfaceProps& surfacePro ps) { 59 const SkSurfaceProps& surfacePro ps) {
60 if (fContext->caps()->shaderCaps()->pathRenderingSupport() && 60 if (fContext->caps()->shaderCaps()->pathRenderingSupport() &&
61 renderTarget->isStencilBufferMultisampled()) { 61 renderTarget->isStencilBufferMultisampled() &&
62 fSurfaceProps.isUseDistanceFieldFonts()) { // FIXME: Rename the dff flag to be more general.
62 GrStencilAttachment* sb = renderTarget->renderTargetPriv().attachStencil Attachment(); 63 GrStencilAttachment* sb = renderTarget->renderTargetPriv().attachStencil Attachment();
63 if (sb) { 64 if (sb) {
64 return GrStencilAndCoverTextContext::Create(fContext, this, surfaceP rops); 65 return GrStencilAndCoverTextContext::Create(fContext, this, surfaceP rops);
65 } 66 }
66 } 67 }
67 68
68 return GrAtlasTextContext::Create(fContext, this, surfaceProps); 69 return GrAtlasTextContext::Create(fContext, this, surfaceProps);
69 } 70 }
70 71
71 void GrDrawContext::drawText(GrRenderTarget* rt, const GrClip& clip, const GrPai nt& grPaint, 72 void GrDrawContext::drawText(GrRenderTarget* rt, const GrClip& clip, const GrPai nt& grPaint,
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 return DrawVerticesBatch::Create(geometry, type, viewMatrix, 1328 return DrawVerticesBatch::Create(geometry, type, viewMatrix,
1328 positions.begin(), vertexCount, 1329 positions.begin(), vertexCount,
1329 indices.begin(), hasIndices ? vertexCount : 0, 1330 indices.begin(), hasIndices ? vertexCount : 0,
1330 colors.begin(), 1331 colors.begin(),
1331 texCoords.begin(), 1332 texCoords.begin(),
1332 bounds); 1333 bounds);
1333 } 1334 }
1334 1335
1335 #endif 1336 #endif
1336 1337
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698