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

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

Issue 1050633002: Revert of BitmapTextBatch and BitmapTextBlob (Closed) Base URL: https://skia.googlesource.com/skia.git@dfpr_take_2
Patch Set: 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
40 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu Device, props); 37 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu Device, props);
41 #endif
42 38
43 return textContext; 39 return textContext;
44 } 40 }
45 41
46 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() { 42 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() {
47 } 43 }
48 44
49 bool GrStencilAndCoverTextContext::canDraw(const GrRenderTarget* rt, 45 bool GrStencilAndCoverTextContext::canDraw(const GrRenderTarget* rt,
50 const GrClip& clip, 46 const GrClip& clip,
51 const GrPaint& paint, 47 const GrPaint& paint,
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 474
479 SkGlyphCache::AttachCache(fGlyphCache); 475 SkGlyphCache::AttachCache(fGlyphCache);
480 fGlyphCache = NULL; 476 fGlyphCache = NULL;
481 477
482 fPipelineBuilder.stencil()->setDisabled(); 478 fPipelineBuilder.stencil()->setDisabled();
483 fStateRestore.set(NULL); 479 fStateRestore.set(NULL);
484 fViewMatrix = fContextInitialMatrix; 480 fViewMatrix = fContextInitialMatrix;
485 GrTextContext::finish(); 481 GrTextContext::finish();
486 } 482 }
487 483
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