OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 | 10 |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 517 |
518 void GrDrawTarget::stencilPath(const GrPath* path, const SkStrokeRec& stroke, Sk
Path::FillType fill) { | 518 void GrDrawTarget::stencilPath(const GrPath* path, const SkStrokeRec& stroke, Sk
Path::FillType fill) { |
519 // TODO: extract portions of checkDraw that are relevant to path stenciling. | 519 // TODO: extract portions of checkDraw that are relevant to path stenciling. |
520 SkASSERT(NULL != path); | 520 SkASSERT(NULL != path); |
521 SkASSERT(this->caps()->pathRenderingSupport()); | 521 SkASSERT(this->caps()->pathRenderingSupport()); |
522 SkASSERT(!stroke.isHairlineStyle()); | 522 SkASSERT(!stroke.isHairlineStyle()); |
523 SkASSERT(!SkPath::IsInverseFillType(fill)); | 523 SkASSERT(!SkPath::IsInverseFillType(fill)); |
524 this->onStencilPath(path, stroke, fill); | 524 this->onStencilPath(path, stroke, fill); |
525 } | 525 } |
526 | 526 |
527 void GrDrawTarget::fillPath(const GrPath* path, const SkStrokeRec& stroke, SkPat
h::FillType fill) { | 527 void GrDrawTarget::drawPath(const GrPath* path, const SkStrokeRec& stroke, SkPat
h::FillType fill) { |
528 // TODO: extract portions of checkDraw that are relevant to path stenciling. | 528 // TODO: extract portions of checkDraw that are relevant to path stenciling. |
529 SkASSERT(NULL != path); | 529 SkASSERT(NULL != path); |
530 SkASSERT(this->caps()->pathRenderingSupport()); | 530 SkASSERT(this->caps()->pathRenderingSupport()); |
531 SkASSERT(!stroke.isHairlineStyle()); | 531 SkASSERT(!stroke.isHairlineStyle()); |
532 this->onFillPath(path, stroke, fill); | 532 this->onDrawPath(path, stroke, fill); |
533 } | 533 } |
534 | 534 |
535 //////////////////////////////////////////////////////////////////////////////// | 535 //////////////////////////////////////////////////////////////////////////////// |
536 | 536 |
537 bool GrDrawTarget::willUseHWAALines() const { | 537 bool GrDrawTarget::willUseHWAALines() const { |
538 // There is a conflict between using smooth lines and our use of premultipli
ed alpha. Smooth | 538 // There is a conflict between using smooth lines and our use of premultipli
ed alpha. Smooth |
539 // lines tweak the incoming alpha value but not in a premul-alpha way. So we
only use them when | 539 // lines tweak the incoming alpha value but not in a premul-alpha way. So we
only use them when |
540 // our alpha is 0xff and tweaking the color for partial coverage is OK | 540 // our alpha is 0xff and tweaking the color for partial coverage is OK |
541 if (!this->caps()->hwAALineSupport() || | 541 if (!this->caps()->hwAALineSupport() || |
542 !this->getDrawState().isHWAntialiasState()) { | 542 !this->getDrawState().isHWAntialiasState()) { |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]); | 998 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]); |
999 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor
t]); | 999 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor
t]); |
1000 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); | 1000 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); |
1001 GrPrintf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport]); | 1001 GrPrintf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport]); |
1002 GrPrintf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport])
; | 1002 GrPrintf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport])
; |
1003 GrPrintf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]); | 1003 GrPrintf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]); |
1004 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize); | 1004 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize); |
1005 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize); | 1005 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize); |
1006 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount); | 1006 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount); |
1007 } | 1007 } |
OLD | NEW |