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

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

Issue 1010113004: Add GrRenderTarget parameter to GrTextContext::canDraw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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
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 "GrBitmapTextContext.h" 9 #include "GrBitmapTextContext.h"
10 #include "GrDrawTarget.h" 10 #include "GrDrawTarget.h"
(...skipping 22 matching lines...) Expand all
33 GrStencilAndCoverTextContext* textContext = SkNEW_ARGS(GrStencilAndCoverText Context, 33 GrStencilAndCoverTextContext* textContext = SkNEW_ARGS(GrStencilAndCoverText Context,
34 (context, props)); 34 (context, props));
35 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, pro ps); 35 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, pro ps);
36 36
37 return textContext; 37 return textContext;
38 } 38 }
39 39
40 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() { 40 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() {
41 } 41 }
42 42
43 bool GrStencilAndCoverTextContext::canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) { 43 bool GrStencilAndCoverTextContext::canDraw(const GrRenderTarget* rt, const SkPai nt& paint,
44 const SkMatrix& viewMatrix) {
44 if (paint.getRasterizer()) { 45 if (paint.getRasterizer()) {
45 return false; 46 return false;
46 } 47 }
47 if (paint.getMaskFilter()) { 48 if (paint.getMaskFilter()) {
48 return false; 49 return false;
49 } 50 }
50 if (paint.getPathEffect()) { 51 if (paint.getPathEffect()) {
51 return false; 52 return false;
52 } 53 }
53 54
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 464
464 SkGlyphCache::AttachCache(fGlyphCache); 465 SkGlyphCache::AttachCache(fGlyphCache);
465 fGlyphCache = NULL; 466 fGlyphCache = NULL;
466 467
467 fPipelineBuilder.stencil()->setDisabled(); 468 fPipelineBuilder.stencil()->setDisabled();
468 fStateRestore.set(NULL); 469 fStateRestore.set(NULL);
469 fViewMatrix = fContextInitialMatrix; 470 fViewMatrix = fContextInitialMatrix;
470 GrTextContext::finish(); 471 GrTextContext::finish();
471 } 472 }
472 473
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698