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

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

Issue 1010113004: Add GrRenderTarget parameter to GrTextContext::canDraw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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
« no previous file with comments | « src/gpu/GrBitmapTextContext.h ('k') | src/gpu/GrDistanceFieldTextContext.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 "GrBitmapTextContext.h" 8 #include "GrBitmapTextContext.h"
9 #include "GrAtlas.h" 9 #include "GrAtlas.h"
10 #include "GrDefaultGeoProcFactory.h" 10 #include "GrDefaultGeoProcFactory.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 fVertexBounds.setLargestInverted(); 62 fVertexBounds.setLargestInverted();
63 } 63 }
64 64
65 GrBitmapTextContext* GrBitmapTextContext::Create(GrContext* context, 65 GrBitmapTextContext* GrBitmapTextContext::Create(GrContext* context,
66 SkGpuDevice* gpuDevice, 66 SkGpuDevice* gpuDevice,
67 const SkDeviceProperties& props ) { 67 const SkDeviceProperties& props ) {
68 return SkNEW_ARGS(GrBitmapTextContext, (context, gpuDevice, props)); 68 return SkNEW_ARGS(GrBitmapTextContext, (context, gpuDevice, props));
69 } 69 }
70 70
71 bool GrBitmapTextContext::canDraw(const SkPaint& paint, const SkMatrix& viewMatr ix) { 71 bool GrBitmapTextContext::canDraw(const GrRenderTarget* rt,
72 return !SkDraw::ShouldDrawTextAsPaths(paint, viewMatrix); 72 const GrClip& clip,
73 const GrPaint& paint,
74 const SkPaint& skPaint,
75 const SkMatrix& viewMatrix) {
76 return !SkDraw::ShouldDrawTextAsPaths(skPaint, viewMatrix);
73 } 77 }
74 78
75 inline void GrBitmapTextContext::init(GrRenderTarget* rt, const GrClip& clip, 79 inline void GrBitmapTextContext::init(GrRenderTarget* rt, const GrClip& clip,
76 const GrPaint& paint, const SkPaint& skPai nt, 80 const GrPaint& paint, const SkPaint& skPai nt,
77 const SkIRect& regionClipBounds) { 81 const SkIRect& regionClipBounds) {
78 GrTextContext::init(rt, clip, paint, skPaint, regionClipBounds); 82 GrTextContext::init(rt, clip, paint, skPaint, regionClipBounds);
79 83
80 fStrike = NULL; 84 fStrike = NULL;
81 85
82 fCurrTexture = NULL; 86 fCurrTexture = NULL;
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 } 632 }
629 } 633 }
630 634
631 inline void GrBitmapTextContext::finish() { 635 inline void GrBitmapTextContext::finish() {
632 this->flush(); 636 this->flush();
633 fTotalVertexCount = 0; 637 fTotalVertexCount = 0;
634 638
635 GrTextContext::finish(); 639 GrTextContext::finish();
636 } 640 }
637 641
OLDNEW
« no previous file with comments | « src/gpu/GrBitmapTextContext.h ('k') | src/gpu/GrDistanceFieldTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698