Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps.
Pass caps to GrEffect::TestCreate() functions so that they can return effects that will work with the capabilities.
Review URL: https://codereview.chromium.org/12965018
git-svn-id: http://skia.googlecode.com/svn/trunk@8369 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 9f9c7d6..d263d40 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -9,6 +9,7 @@
#include "GrDrawTarget.h"
+#include "GrDrawTargetCaps.h"
#include "GrRenderTarget.h"
#include "GrTexture.h"
#include "GrVertexBuffer.h"
@@ -679,9 +680,9 @@
///////////////////////////////////////////////////////////////////////////////
-SK_DEFINE_INST_COUNT(GrDrawTarget::Caps)
+SK_DEFINE_INST_COUNT(GrDrawTargetCaps)
-void GrDrawTarget::Caps::reset() {
+void GrDrawTargetCaps::reset() {
f8BitPaletteSupport = false;
fNPOTTextureTileSupport = false;
fTwoSidedStencilSupport = false;
@@ -689,7 +690,7 @@
fHWAALineSupport = false;
fShaderDerivativeSupport = false;
fGeometryShaderSupport = false;
- fDualSourceBlendingSupport = false;
+ fDualSourceBlendingSupport = false;
fBufferLockSupport = false;
fPathStencilingSupport = false;
@@ -698,7 +699,7 @@
fMaxSampleCount = 0;
}
-GrDrawTarget::Caps& GrDrawTarget::Caps::operator=(const GrDrawTarget::Caps& other) {
+GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) {
f8BitPaletteSupport = other.f8BitPaletteSupport;
fNPOTTextureTileSupport = other.fNPOTTextureTileSupport;
fTwoSidedStencilSupport = other.fTwoSidedStencilSupport;
@@ -717,7 +718,7 @@
return *this;
}
-void GrDrawTarget::Caps::print() const {
+void GrDrawTargetCaps::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]);