| 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()->pathStencilingSupport()); | 521 SkASSERT(this->caps()->pathStencilingSupport()); |
| 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::drawPath(const GrPath* path, const SkStrokeRec& stroke, SkPat
h::FillType fill) { |
| 528 // TODO: extract portions of checkDraw that are relevant to path stenciling. |
| 529 SkASSERT(NULL != path); |
| 530 SkASSERT(!SkPath::IsInverseFillType(fill)); |
| 531 SkASSERT(this->caps()->pathStencilingSupport()); |
| 532 this->onDrawPath(path, stroke, fill); |
| 533 } |
| 534 |
| 527 //////////////////////////////////////////////////////////////////////////////// | 535 //////////////////////////////////////////////////////////////////////////////// |
| 528 | 536 |
| 529 bool GrDrawTarget::willUseHWAALines() const { | 537 bool GrDrawTarget::willUseHWAALines() const { |
| 530 // 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 |
| 531 // 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 |
| 532 // 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 |
| 533 if (!this->caps()->hwAALineSupport() || | 541 if (!this->caps()->hwAALineSupport() || |
| 534 !this->getDrawState().isHWAntialiasState()) { | 542 !this->getDrawState().isHWAntialiasState()) { |
| 535 return false; | 543 return false; |
| 536 } | 544 } |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]); | 998 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]); |
| 991 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor
t]); | 999 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor
t]); |
| 992 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); | 1000 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); |
| 993 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]); | 1001 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]); |
| 994 GrPrintf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport])
; | 1002 GrPrintf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport])
; |
| 995 GrPrintf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]); | 1003 GrPrintf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]); |
| 996 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize); | 1004 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize); |
| 997 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize); | 1005 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize); |
| 998 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount); | 1006 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount); |
| 999 } | 1007 } |
| OLD | NEW |