зеркало из https://github.com/mozilla/moz-skia.git
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
This commit is contained in:
Родитель
ac20fb9955
Коммит
8195f67427
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче