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

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

Issue 1191943002: Add useDFT field to SkDeviceProperties (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 5 years, 6 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/GrStencilAndCoverTextContext.h ('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 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 "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 14 matching lines...) Expand all
25 GrDrawContext* drawCo ntext, 25 GrDrawContext* drawCo ntext,
26 const SkDevicePropert ies& properties) 26 const SkDevicePropert ies& properties)
27 : GrTextContext(context, drawContext, properties) 27 : GrTextContext(context, drawContext, properties)
28 , fStroke(SkStrokeRec::kFill_InitStyle) 28 , fStroke(SkStrokeRec::kFill_InitStyle)
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, GrDrawContext* drawCont ext, 34 GrStencilAndCoverTextContext::Create(GrContext* context, GrDrawContext* drawCont ext,
35 const SkDeviceProperties& props, bool fallb ackUsesDFT) { 35 const SkDeviceProperties& props) {
36 GrStencilAndCoverTextContext* textContext = SkNEW_ARGS(GrStencilAndCoverText Context, 36 GrStencilAndCoverTextContext* textContext = SkNEW_ARGS(GrStencilAndCoverText Context,
37 (context, drawContext , props)); 37 (context, drawContext , props));
38 textContext->fFallbackTextContext = GrAtlasTextContext::Create(context, draw Context, 38 textContext->fFallbackTextContext = GrAtlasTextContext::Create(context, draw Context, props);
39 props, fallba ckUsesDFT);
40 39
41 return textContext; 40 return textContext;
42 } 41 }
43 42
44 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() { 43 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() {
45 } 44 }
46 45
47 bool GrStencilAndCoverTextContext::canDraw(const GrRenderTarget* rt, 46 bool GrStencilAndCoverTextContext::canDraw(const GrRenderTarget* rt,
48 const GrClip& clip, 47 const GrClip& clip,
49 const GrPaint& paint, 48 const GrPaint& paint,
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 fGlyphs = NULL; 480 fGlyphs = NULL;
482 481
483 SkGlyphCache::AttachCache(fGlyphCache); 482 SkGlyphCache::AttachCache(fGlyphCache);
484 fGlyphCache = NULL; 483 fGlyphCache = NULL;
485 484
486 fPipelineBuilder.stencil()->setDisabled(); 485 fPipelineBuilder.stencil()->setDisabled();
487 fStateRestore.set(NULL); 486 fStateRestore.set(NULL);
488 fViewMatrix = fContextInitialMatrix; 487 fViewMatrix = fContextInitialMatrix;
489 } 488 }
490 489
OLDNEW
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698