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

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

Issue 1011403004: BitmapTextBatch and BitmapTextBlob (Closed) Base URL: https://skia.googlesource.com/skia.git@dfpr_take_2
Patch Set: feedback inc 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 16 matching lines...) Expand all
27 , fStroke(SkStrokeRec::kFill_InitStyle) 27 , fStroke(SkStrokeRec::kFill_InitStyle)
28 , fQueuedGlyphCount(0) 28 , fQueuedGlyphCount(0)
29 , fFallbackGlyphsIdx(kGlyphBufferSize) { 29 , fFallbackGlyphsIdx(kGlyphBufferSize) {
30 } 30 }
31 31
32 GrStencilAndCoverTextContext* 32 GrStencilAndCoverTextContext*
33 GrStencilAndCoverTextContext::Create(GrContext* context, SkGpuDevice* gpuDevice, 33 GrStencilAndCoverTextContext::Create(GrContext* context, SkGpuDevice* gpuDevice,
34 const SkDeviceProperties& props) { 34 const SkDeviceProperties& props) {
35 GrStencilAndCoverTextContext* textContext = SkNEW_ARGS(GrStencilAndCoverText Context, 35 GrStencilAndCoverTextContext* textContext = SkNEW_ARGS(GrStencilAndCoverText Context,
36 (context, gpuDevice, props)); 36 (context, gpuDevice, props));
37 #ifdef USE_BITMAP_TEXTBLOBS
38 textContext->fFallbackTextContext = GrBitmapTextContextB::Create(context, gp uDevice, props);
39 #else
37 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu Device, props); 40 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu Device, props);
41 #endif
38 42
39 return textContext; 43 return textContext;
40 } 44 }
41 45
42 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() { 46 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() {
43 } 47 }
44 48
45 bool GrStencilAndCoverTextContext::canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) { 49 bool GrStencilAndCoverTextContext::canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) {
46 if (paint.getRasterizer()) { 50 if (paint.getRasterizer()) {
47 return false; 51 return false;
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 474
471 SkGlyphCache::AttachCache(fGlyphCache); 475 SkGlyphCache::AttachCache(fGlyphCache);
472 fGlyphCache = NULL; 476 fGlyphCache = NULL;
473 477
474 fPipelineBuilder.stencil()->setDisabled(); 478 fPipelineBuilder.stencil()->setDisabled();
475 fStateRestore.set(NULL); 479 fStateRestore.set(NULL);
476 fViewMatrix = fContextInitialMatrix; 480 fViewMatrix = fContextInitialMatrix;
477 GrTextContext::finish(); 481 GrTextContext::finish();
478 } 482 }
479 483
OLDNEW
« src/gpu/GrGlyph.h ('K') | « src/gpu/GrGlyph.h ('k') | src/gpu/GrTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698