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

Unified Diff: src/gpu/GrProcOptInfo.cpp

Issue 845103005: GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: cleanup Created 5 years, 11 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
Index: src/gpu/GrProcOptInfo.cpp
diff --git a/src/gpu/GrProcOptInfo.cpp b/src/gpu/GrProcOptInfo.cpp
index 274c5305de3b17ef5c8747a5f5bc8caac0a0fed6..c2c52ac94d884e1cf1559f60d44530629e40c3fe 100644
--- a/src/gpu/GrProcOptInfo.cpp
+++ b/src/gpu/GrProcOptInfo.cpp
@@ -7,10 +7,31 @@
#include "GrProcOptInfo.h"
+#include "GrBatch.h"
#include "GrFragmentProcessor.h"
#include "GrFragmentStage.h"
#include "GrGeometryProcessor.h"
+void GrProcOptInfo::calcColorWithBatch(const GrBatch* batch,
+ const GrBatchOpt& batchOpt,
+ const GrFragmentStage* stages,
+ int stageCount) {
+ GrInitInvariantOutput out;
+ batch->getInvariantOutputColor(&out, batchOpt);
+ fInOut.reset(out);
+ this->internalCalc(stages, stageCount, batch->willReadFragmentPosition());
+}
+
+void GrProcOptInfo::calcCoverageWithBatch(const GrBatch* batch,
+ const GrBatchOpt& batchOpt,
+ const GrFragmentStage* stages,
+ int stageCount) {
+ GrInitInvariantOutput out;
+ batch->getInvariantOutputCoverage(&out, batchOpt);
+ fInOut.reset(out);
+ this->internalCalc(stages, stageCount, batch->willReadFragmentPosition());
+}
+
void GrProcOptInfo::calcColorWithPrimProc(const GrPrimitiveProcessor* primProc,
const GrFragmentStage* stages,
int stageCount) {

Powered by Google App Engine
This is Rietveld 408576698