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

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: fix for segfault Created 5 years, 8 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/GrGlyph.h ('k') | src/gpu/GrTextContext.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 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 GrRenderTarget* rt, 49 bool GrStencilAndCoverTextContext::canDraw(const GrRenderTarget* rt,
46 const GrClip& clip, 50 const GrClip& clip,
47 const GrPaint& paint, 51 const GrPaint& paint,
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 478
475 SkGlyphCache::AttachCache(fGlyphCache); 479 SkGlyphCache::AttachCache(fGlyphCache);
476 fGlyphCache = NULL; 480 fGlyphCache = NULL;
477 481
478 fPipelineBuilder.stencil()->setDisabled(); 482 fPipelineBuilder.stencil()->setDisabled();
479 fStateRestore.set(NULL); 483 fStateRestore.set(NULL);
480 fViewMatrix = fContextInitialMatrix; 484 fViewMatrix = fContextInitialMatrix;
481 GrTextContext::finish(); 485 GrTextContext::finish();
482 } 486 }
483 487
OLDNEW
« no previous file with comments | « src/gpu/GrGlyph.h ('k') | src/gpu/GrTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698