aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-12 18:14:28 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-12 18:14:28 +0000
commit8195f674278e8d785bf57489847b1d05d3c2f7d5 (patch)
treea1dedada5e2f0c83b9bcdf206e751d14ac67b712
parentac20fb9955e9323f6d4e87013a41355abf9e0893 (diff)
rename DrawState to DrState -- MS decided to #define DrawState, complicating
our (compiler) lives :( git-svn-id: http://skia.googlecode.com/svn/trunk@689 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--gpu/include/GrDrawTarget.h16
-rw-r--r--gpu/src/GrGpu.cpp2
-rw-r--r--gpu/src/GrGpuGL.h4
-rw-r--r--gpu/src/GrInOrderDrawBuffer.cpp2
4 files changed, 12 insertions, 12 deletions
diff --git a/gpu/include/GrDrawTarget.h b/gpu/include/GrDrawTarget.h
index fee13a6c7e..2823da70c6 100644
--- a/gpu/include/GrDrawTarget.h
+++ b/gpu/include/GrDrawTarget.h
@@ -131,7 +131,7 @@ protected:
kMatrixModeCount
};
- struct DrawState {
+ struct DrState {
uint32_t fFlagBits;
BlendCoeff fSrcBlend;
BlendCoeff fDstBlend;
@@ -143,10 +143,10 @@ protected:
StencilPass fStencilPass;
bool fReverseFill;
GrMatrix fMatrixModeCache[kMatrixModeCount];
- bool operator ==(const DrawState& s) const {
- return 0 == memcmp(this, &s, sizeof(DrawState));
+ bool operator ==(const DrState& s) const {
+ return 0 == memcmp(this, &s, sizeof(DrState));
}
- bool operator !=(const DrawState& s) const { return !(*this == s); }
+ bool operator !=(const DrState& s) const { return !(*this == s); }
};
public:
@@ -346,7 +346,7 @@ public:
*/
struct SavedDrawState {
private:
- DrawState fState;
+ DrState fState;
friend class GrDrawTarget;
};
@@ -664,9 +664,9 @@ protected:
// Helpers for GrDrawTarget subclasses that won't have private access to
// SavedDrawState but need to peek at the state values.
- static DrawState& accessSavedDrawState(SavedDrawState& sds)
+ static DrState& accessSavedDrawState(SavedDrawState& sds)
{ return sds.fState; }
- static const DrawState& accessSavedDrawState(const SavedDrawState& sds)
+ static const DrState& accessSavedDrawState(const SavedDrawState& sds)
{ return sds.fState; }
// implemented by subclass
@@ -706,7 +706,7 @@ protected:
GrClip fClip;
- DrawState fCurrDrawState;
+ DrState fCurrDrawState;
// set texture or modelview matrix
void loadMatrix(const GrMatrix&, MatrixMode);
diff --git a/gpu/src/GrGpu.cpp b/gpu/src/GrGpu.cpp
index c6340bdc0b..f9ee217426 100644
--- a/gpu/src/GrGpu.cpp
+++ b/gpu/src/GrGpu.cpp
@@ -112,7 +112,7 @@ bool GrGpu::canDisableBlend() const {
static const int MAX_QUADS = 512; // max possible: (1 << 14) - 1;
-GR_STATIC_ASSERT(4 * MAX_QUADS <= UINT16_MAX);
+GR_STATIC_ASSERT(4 * MAX_QUADS <= 65535);
static inline void fillIndices(uint16_t* indices, int quadCount) {
for (int i = 0; i < quadCount; ++i) {
diff --git a/gpu/src/GrGpuGL.h b/gpu/src/GrGpuGL.h
index dc766be3d2..728a5d343b 100644
--- a/gpu/src/GrGpuGL.h
+++ b/gpu/src/GrGpuGL.h
@@ -70,8 +70,8 @@ protected:
const GrIndexBuffer* fIndexBuffer;
} fHWGeometryState;
- DrawState fHWDrawState;
- bool fHWStencilClip;
+ DrState fHWDrawState;
+ bool fHWStencilClip;
virtual void drawIndexedHelper(PrimitiveType type,
uint32_t startVertex,
diff --git a/gpu/src/GrInOrderDrawBuffer.cpp b/gpu/src/GrInOrderDrawBuffer.cpp
index 3f25f2fa68..952ba836ae 100644
--- a/gpu/src/GrInOrderDrawBuffer.cpp
+++ b/gpu/src/GrInOrderDrawBuffer.cpp
@@ -316,7 +316,7 @@ bool GrInOrderDrawBuffer::grabState() {
if (fStates.empty()) {
newState = true;
} else {
- const DrawState& old = accessSavedDrawState(fStates.back());
+ const DrState& old = accessSavedDrawState(fStates.back());
newState = old != fCurrDrawState;
}
if (newState) {