Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: src/gpu/GrDrawState.h

Issue 12462008: Add GrEllipseEdgeEffect (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: rebase again Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawState.h
===================================================================
--- src/gpu/GrDrawState.h (revision 8091)
+++ src/gpu/GrDrawState.h (working copy)
@@ -181,6 +181,8 @@
*/
void setDefaultVertexAttribs();
+ bool validateVertexAttribs() const;
+
////////////////////////////////////////////////////////////////////////////
// Helpers for picking apart vertex attributes
@@ -332,7 +334,7 @@
bool hasSolidCoverage(GrAttribBindings) const;
static void VertexAttributesUnitTest();
-
+
/// @}
///////////////////////////////////////////////////////////////////////////
@@ -483,8 +485,9 @@
/// @name Effect Stages
////
- const GrEffectRef* setEffect(int stageIdx, const GrEffectRef* effect) {
- fStages[stageIdx].setEffect(effect);
+ const GrEffectRef* setEffect(int stageIdx, const GrEffectRef* effect,
+ const int* indices = NULL) {
+ fStages[stageIdx].setEffect(effect, indices);
return effect;
}
@@ -514,7 +517,9 @@
return true;
}
- void disableStage(int stageIdx) { this->setEffect(stageIdx, NULL); }
+ void disableStage(int stageIdx) {
+ this->setEffect(stageIdx, NULL, NULL);
+ }
/**
* Release all the GrEffects referred to by this draw state.
@@ -1021,9 +1026,6 @@
/* Circle specified as center_x, center_y, outer_radius, inner_radius
all in window space (y-down). */
kCircle_EdgeType,
- /* Axis-aligned ellipse specified as center_x, center_y, x_radius, x_radius/y_radius
- all in window space (y-down). */
- kEllipse_EdgeType,
kVertexEdgeTypeCnt
};
@@ -1189,14 +1191,9 @@
if (fRenderTarget.get() != s.fRenderTarget.get() || fCommon != s.fCommon) {
return false;
}
- if (fVertexAttribs.count() != s.fVertexAttribs.count()) {
+ if (fVertexAttribs != s.fVertexAttribs) {
return false;
}
- for (int i = 0; i < fVertexAttribs.count(); ++i) {
- if (fVertexAttribs[i] != s.fVertexAttribs[i]) {
- return false;
- }
- }
for (int i = 0; i < kAttribIndexCount; ++i) {
if ((i == kPosition_AttribIndex ||
s.fCommon.fAttribBindings & kAttribIndexMasks[i]) &&
@@ -1335,13 +1332,9 @@
return false;
}
}
- if (fVertexAttribs.count() != state.fVertexAttribs.count()) {
+ if (fVertexAttribs != state.fVertexAttribs) {
return false;
}
- for (int i = 0; i < fVertexAttribs.count(); ++i)
- if (fVertexAttribs[i] != state.fVertexAttribs[i]) {
- return false;
- }
for (int i = 0; i < kNumStages; ++i) {
if (!fStages[i].isEqual(state.fStages[i])) {
return false;
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698