OLD | NEW |
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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 347 |
348 fGlyphCache = fSkPaint.detachCache(&fDeviceProperties, NULL, true /*igno
reGamma*/); | 348 fGlyphCache = fSkPaint.detachCache(&fDeviceProperties, NULL, true /*igno
reGamma*/); |
349 fGlyphs = canUseRawPaths ? | 349 fGlyphs = canUseRawPaths ? |
350 get_gr_glyphs(fContext, fSkPaint.getTypeface(), NULL, fStr
oke) : | 350 get_gr_glyphs(fContext, fSkPaint.getTypeface(), NULL, fStr
oke) : |
351 get_gr_glyphs(fContext, fGlyphCache->getScalerContext()->g
etTypeface(), | 351 get_gr_glyphs(fContext, fGlyphCache->getScalerContext()->g
etTypeface(), |
352 &fGlyphCache->getDescriptor(), fStroke); | 352 &fGlyphCache->getDescriptor(), fStroke); |
353 } | 353 } |
354 | 354 |
355 fStateRestore.set(&fPipelineBuilder); | 355 fStateRestore.set(&fPipelineBuilder); |
356 | 356 |
357 fPipelineBuilder.setFromPaint(fPaint, fRenderTarget); | 357 fPipelineBuilder.setFromPaint(fPaint, fRenderTarget, fClip); |
358 | 358 |
359 GR_STATIC_CONST_SAME_STENCIL(kStencilPass, | 359 GR_STATIC_CONST_SAME_STENCIL(kStencilPass, |
360 kZero_StencilOp, | 360 kZero_StencilOp, |
361 kZero_StencilOp, | 361 kZero_StencilOp, |
362 kNotEqual_StencilFunc, | 362 kNotEqual_StencilFunc, |
363 0xffff, | 363 0xffff, |
364 0x0000, | 364 0x0000, |
365 0xffff); | 365 0xffff); |
366 | 366 |
367 *fPipelineBuilder.stencil() = kStencilPass; | 367 *fPipelineBuilder.stencil() = kStencilPass; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 460 |
461 SkGlyphCache::AttachCache(fGlyphCache); | 461 SkGlyphCache::AttachCache(fGlyphCache); |
462 fGlyphCache = NULL; | 462 fGlyphCache = NULL; |
463 | 463 |
464 fPipelineBuilder.stencil()->setDisabled(); | 464 fPipelineBuilder.stencil()->setDisabled(); |
465 fStateRestore.set(NULL); | 465 fStateRestore.set(NULL); |
466 fViewMatrix = fContextInitialMatrix; | 466 fViewMatrix = fContextInitialMatrix; |
467 GrTextContext::finish(); | 467 GrTextContext::finish(); |
468 } | 468 } |
469 | 469 |
OLD | NEW |