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

Unified Diff: src/gpu/GrDrawState.cpp

Issue 18686007: Make GrPaint have a variable sized array of color and coverage stages rather than a fixed size. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rob's comments Created 7 years, 5 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/GrPaint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawState.cpp
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index 7c68543479f1a898396fd3487aca9ee2f824ad0b..ab800d24e7c1c74268a02312caec8dc3d7b65d4a 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -32,16 +32,12 @@ void GrDrawState::setFromPaint(const GrPaint& paint, const SkMatrix& vm, GrRende
fColorStages.reset();
fCoverageStages.reset();
- for (int i = 0; i < GrPaint::kMaxColorStages; ++i) {
- if (paint.isColorStageEnabled(i)) {
- fColorStages.push_back(paint.getColorStage(i));
- }
+ for (int i = 0; i < paint.numColorStages(); ++i) {
+ fColorStages.push_back(paint.getColorStage(i));
}
- for (int i = 0; i < GrPaint::kMaxCoverageStages; ++i) {
- if (paint.isCoverageStageEnabled(i)) {
- fCoverageStages.push_back(paint.getCoverageStage(i));
- }
+ for (int i = 0; i < paint.numCoverageStages(); ++i) {
+ fCoverageStages.push_back(paint.getCoverageStage(i));
}
this->setRenderTarget(rt);
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698