| 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 "GrAtlasTextContext.h" | 9 #include "GrAtlasTextContext.h" |
| 10 #include "GrDrawContext.h" | 10 #include "GrDrawContext.h" |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 fGlyphCache = fSkPaint.detachCache(&fDeviceProperties, NULL, true /*igno
reGamma*/); | 366 fGlyphCache = fSkPaint.detachCache(&fDeviceProperties, NULL, true /*igno
reGamma*/); |
| 367 fGlyphs = canUseRawPaths ? | 367 fGlyphs = canUseRawPaths ? |
| 368 get_gr_glyphs(fContext, fSkPaint.getTypeface(), NULL, fStr
oke) : | 368 get_gr_glyphs(fContext, fSkPaint.getTypeface(), NULL, fStr
oke) : |
| 369 get_gr_glyphs(fContext, fGlyphCache->getScalerContext()->g
etTypeface(), | 369 get_gr_glyphs(fContext, fGlyphCache->getScalerContext()->g
etTypeface(), |
| 370 &fGlyphCache->getDescriptor(), fStroke); | 370 &fGlyphCache->getDescriptor(), fStroke); |
| 371 } | 371 } |
| 372 | 372 |
| 373 fStateRestore.set(&fPipelineBuilder); | 373 fStateRestore.set(&fPipelineBuilder); |
| 374 | 374 |
| 375 fPipelineBuilder.setFromPaint(fPaint, fRenderTarget, fClip); | 375 fPipelineBuilder.setFromPaint(fPaint, fRenderTarget, fClip); |
| 376 SkASSERT(fRenderTarget->isStencilBufferMultisampled() || !fPaint.isAntiAlias
()); |
| 377 fPipelineBuilder.setState(GrPipelineBuilder::kHWAntialias_Flag, fPaint.isAnt
iAlias()); |
| 376 | 378 |
| 377 GR_STATIC_CONST_SAME_STENCIL(kStencilPass, | 379 GR_STATIC_CONST_SAME_STENCIL(kStencilPass, |
| 378 kZero_StencilOp, | 380 kZero_StencilOp, |
| 379 kZero_StencilOp, | 381 kZero_StencilOp, |
| 380 kNotEqual_StencilFunc, | 382 kNotEqual_StencilFunc, |
| 381 0xffff, | 383 0xffff, |
| 382 0x0000, | 384 0x0000, |
| 383 0xffff); | 385 0xffff); |
| 384 | 386 |
| 385 *fPipelineBuilder.stencil() = kStencilPass; | 387 *fPipelineBuilder.stencil() = kStencilPass; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 fGlyphs = NULL; | 481 fGlyphs = NULL; |
| 480 | 482 |
| 481 SkGlyphCache::AttachCache(fGlyphCache); | 483 SkGlyphCache::AttachCache(fGlyphCache); |
| 482 fGlyphCache = NULL; | 484 fGlyphCache = NULL; |
| 483 | 485 |
| 484 fPipelineBuilder.stencil()->setDisabled(); | 486 fPipelineBuilder.stencil()->setDisabled(); |
| 485 fStateRestore.set(NULL); | 487 fStateRestore.set(NULL); |
| 486 fViewMatrix = fContextInitialMatrix; | 488 fViewMatrix = fContextInitialMatrix; |
| 487 } | 489 } |
| 488 | 490 |
| OLD | NEW |