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

Unified Diff: include/gpu/effects/GrPorterDuffXferProcessor.h

Issue 900883002: Revert of Move DstCopy on gpu into the GrXferProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « include/gpu/GrXferProcessor.h ('k') | src/effects/SkArithmeticMode_gpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/effects/GrPorterDuffXferProcessor.h
diff --git a/include/gpu/effects/GrPorterDuffXferProcessor.h b/include/gpu/effects/GrPorterDuffXferProcessor.h
index e47ec1e9048b9d3cd4de3863362a69cdcfce7853..af10fa23ec1fbff1b51d3cdc993bee4b120b48f9 100644
--- a/include/gpu/effects/GrPorterDuffXferProcessor.h
+++ b/include/gpu/effects/GrPorterDuffXferProcessor.h
@@ -12,21 +12,20 @@
#include "GrXferProcessor.h"
#include "SkXfermode.h"
-class GrDrawTargetCaps;
class GrProcOptInfo;
class GrPorterDuffXferProcessor : public GrXferProcessor {
public:
static GrXferProcessor* Create(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend,
- GrColor constant, const GrDeviceCoordTexture* dstCopy,
- bool willReadDstColor) {
- return SkNEW_ARGS(GrPorterDuffXferProcessor, (srcBlend, dstBlend, constant, dstCopy,
- willReadDstColor));
+ GrColor constant = 0) {
+ return SkNEW_ARGS(GrPorterDuffXferProcessor, (srcBlend, dstBlend, constant));
}
~GrPorterDuffXferProcessor() SK_OVERRIDE;
const char* name() const SK_OVERRIDE { return "Porter Duff"; }
+
+ void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE;
GrGLXferProcessor* createGLInstance() const SK_OVERRIDE;
@@ -76,10 +75,7 @@
}
private:
- GrPorterDuffXferProcessor(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend, GrColor constant,
- const GrDeviceCoordTexture* dstCopy, bool willReadDstColor);
-
- void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE;
+ GrPorterDuffXferProcessor(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend, GrColor constant);
bool onIsEqual(const GrXferProcessor& xpBase) const SK_OVERRIDE {
const GrPorterDuffXferProcessor& xp = xpBase.cast<GrPorterDuffXferProcessor>();
@@ -123,6 +119,9 @@
return SkNEW_ARGS(GrPorterDuffXPFactory, (src, dst));
}
+ GrXferProcessor* createXferProcessor(const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI) const SK_OVERRIDE;
+
bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const SK_OVERRIDE;
bool canApplyCoverage(const GrProcOptInfo& colorPOI,
@@ -133,14 +132,10 @@
void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
GrXPFactory::InvariantOutput*) const SK_OVERRIDE;
+ bool willReadDst() const SK_OVERRIDE { return false; }
+
private:
GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst);
-
- GrXferProcessor* onCreateXferProcessor(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI,
- const GrDeviceCoordTexture* dstCopy) const SK_OVERRIDE;
-
- bool willReadDstColor() const SK_OVERRIDE;
bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE {
const GrPorterDuffXPFactory& xpf = xpfBase.cast<GrPorterDuffXPFactory>();
« no previous file with comments | « include/gpu/GrXferProcessor.h ('k') | src/effects/SkArithmeticMode_gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698