aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawTarget.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-28 21:11:35 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-28 21:11:35 +0000
commitf66018798099750e639a8fa131fece492a050997 (patch)
tree4238c882198f2050a2e2ab270ae0c89dc1d49ed0 /src/gpu/GrDrawTarget.cpp
parenta7e483d130a65833e4c0d4abb4c2f13a9ce7703b (diff)
Hide GrDrawTarget::Caps's member vars
Review URL: https://codereview.appspot.com/6499044 git-svn-id: http://skia.googlecode.com/svn/trunk@5328 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrDrawTarget.cpp')
-rw-r--r--src/gpu/GrDrawTarget.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index a567699560..0b61f6e531 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -786,7 +786,7 @@ void GrDrawTarget::drawNonIndexed(GrPrimitiveType type,
void GrDrawTarget::stencilPath(const GrPath* path, GrPathFill fill) {
// TODO: extract portions of checkDraw that are relevant to path stenciling.
GrAssert(NULL != path);
- GrAssert(fCaps.fPathStencilingSupport);
+ GrAssert(fCaps.pathStencilingSupport());
GrAssert(kHairLine_GrPathFill != fill);
GrAssert(!GrIsFillInverted(fill));
this->onStencilPath(path, fill);
@@ -979,7 +979,7 @@ bool GrDrawTarget::willUseHWAALines() const {
// premultiplied alpha. Smooth lines tweak the incoming alpha value
// but not in a premul-alpha way. So we only use them when our alpha
// is 0xff and tweaking the color for partial coverage is OK
- if (!fCaps.fHWAALineSupport ||
+ if (!fCaps.hwAALineSupport() ||
!this->getDrawState().isHWAntialiasState()) {
return false;
}
@@ -991,7 +991,7 @@ bool GrDrawTarget::willUseHWAALines() const {
bool GrDrawTarget::canApplyCoverage() const {
// we can correctly apply coverage if a) we have dual source blending
// or b) one of our blend optimizations applies.
- return this->getCaps().fDualSourceBlendingSupport ||
+ return this->getCaps().dualSourceBlendingSupport() ||
kNone_BlendOpt != this->getBlendOpts(true);
}
@@ -1237,18 +1237,17 @@ void GrDrawTarget::AutoReleaseGeometry::reset() {
void GrDrawTarget::Caps::print() const {
static const char* gNY[] = {"NO", "YES"};
- GrPrintf("8 Bit Palette Support : %s\n", gNY[f8BitPaletteSupport]);
- GrPrintf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileSupport]);
- GrPrintf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilSupport]);
- GrPrintf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSupport]);
- GrPrintf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]);
- GrPrintf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport]);
- GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]);
- GrPrintf("FSAA Support : %s\n", gNY[fFSAASupport]);
- GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSupport]);
- GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]);
- GrPrintf("Max Texture Size : %d\n", fMaxTextureSize);
- GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize);
+ GrPrintf("8 Bit Palette Support : %s\n", gNY[fInternals.f8BitPaletteSupport]);
+ GrPrintf("NPOT Texture Tile Support : %s\n", gNY[fInternals.fNPOTTextureTileSupport]);
+ GrPrintf("Two Sided Stencil Support : %s\n", gNY[fInternals.fTwoSidedStencilSupport]);
+ GrPrintf("Stencil Wrap Ops Support : %s\n", gNY[fInternals.fStencilWrapOpsSupport]);
+ GrPrintf("HW AA Lines Support : %s\n", gNY[fInternals.fHWAALineSupport]);
+ GrPrintf("Shader Derivative Support : %s\n", gNY[fInternals.fShaderDerivativeSupport]);
+ GrPrintf("Geometry Shader Support : %s\n", gNY[fInternals.fGeometryShaderSupport]);
+ GrPrintf("FSAA Support : %s\n", gNY[fInternals.fFSAASupport]);
+ GrPrintf("Dual Source Blending Support: %s\n", gNY[fInternals.fDualSourceBlendingSupport]);
+ GrPrintf("Buffer Lock Support : %s\n", gNY[fInternals.fBufferLockSupport]);
+ GrPrintf("Path Stenciling Support : %s\n", gNY[fInternals.fPathStencilingSupport]);
+ GrPrintf("Max Texture Size : %d\n", fInternals.fMaxTextureSize);
+ GrPrintf("Max Render Target Size : %d\n", fInternals.fMaxRenderTargetSize);
}
-
-