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

Unified Diff: src/gpu/GrPipeline.cpp

Issue 845103005: GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: removing dstread 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
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPipeline.cpp
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index c35808e033732c479f6930a052f7f1f1b0a1135e..911169e3368f6a2c30203d73a226813357d8c509 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -7,6 +7,7 @@
#include "GrPipeline.h"
+#include "GrBatch.h"
#include "GrDrawTargetCaps.h"
#include "GrGpu.h"
#include "GrPipelineBuilder.h"
@@ -14,13 +15,37 @@
#include "GrXferProcessor.h"
GrPipeline::GrPipeline(const GrPipelineBuilder& pipelineBuilder,
- const GrPrimitiveProcessor* primProc,
- const GrDrawTargetCaps& caps,
- const GrScissorState& scissorState,
- const GrDeviceCoordTexture* dstCopy) {
+ const GrPrimitiveProcessor* primProc,
+ const GrDrawTargetCaps& caps,
+ const GrScissorState& scissorState,
+ const GrDeviceCoordTexture* dstCopy) {
const GrProcOptInfo& colorPOI = pipelineBuilder.colorProcInfo(primProc);
const GrProcOptInfo& coveragePOI = pipelineBuilder.coverageProcInfo(primProc);
+ this->internalConstructor(pipelineBuilder, colorPOI, coveragePOI, caps, scissorState, dstCopy);
+}
+
+GrPipeline::GrPipeline(GrBatch* batch,
+ const GrPipelineBuilder& pipelineBuilder,
+ const GrDrawTargetCaps& caps,
+ const GrScissorState& scissorState,
+ const GrDeviceCoordTexture* dstCopy) {
+ GrBatchOpt batchOpt;
+ batchOpt.fCanTweakAlphaForCoverage = pipelineBuilder.canTweakAlphaForCoverage();
+ batch->initBatchOpt(batchOpt);
+
+ const GrProcOptInfo& colorPOI = pipelineBuilder.colorProcInfo(batch);
+ const GrProcOptInfo& coveragePOI = pipelineBuilder.coverageProcInfo(batch);
+
+ this->internalConstructor(pipelineBuilder, colorPOI, coveragePOI, caps, scissorState, dstCopy);
+}
+
+void GrPipeline::internalConstructor(const GrPipelineBuilder& pipelineBuilder,
+ const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI,
+ const GrDrawTargetCaps& caps,
+ const GrScissorState& scissorState,
+ const GrDeviceCoordTexture* dstCopy) {
// Create XferProcessor from DS's XPFactory
SkAutoTUnref<GrXferProcessor> xferProcessor(
pipelineBuilder.getXPFactory()->createXferProcessor(colorPOI, coveragePOI));
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698