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

Unified Diff: src/gpu/effects/GrPorterDuffXferProcessor.cpp

Issue 1049143002: Add onGetBlendInfo to GrXferProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_nvbea_tokens
Patch Set: rebase Created 5 years, 8 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/effects/GrDisableColorXP.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrPorterDuffXferProcessor.cpp
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
index 2735ac3c22eceefc9049a382c4c751a746a1d23b..77b7fcaac00c5e52a6d433124d513ea5ca8f208d 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -90,7 +90,16 @@ public:
GrColor* overrideColor,
const GrDrawTargetCaps& caps) override;
- void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override {
+ GrBlendCoeff getSrcBlend() const { return fSrcBlend; }
+ GrBlendCoeff getDstBlend() const { return fDstBlend; }
+
+private:
+ PorterDuffXferProcessor(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend, GrColor constant,
+ const GrDeviceCoordTexture* dstCopy, bool willReadDstColor);
+
+ void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const override;
+
+ void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override {
if (!this->willReadDstColor()) {
blendInfo->fSrcBlend = fSrcBlend;
blendInfo->fDstBlend = fDstBlend;
@@ -101,15 +110,6 @@ public:
blendInfo->fBlendConstant = fBlendConstant;
}
- GrBlendCoeff getSrcBlend() const { return fSrcBlend; }
- GrBlendCoeff getDstBlend() const { return fDstBlend; }
-
-private:
- PorterDuffXferProcessor(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend, GrColor constant,
- const GrDeviceCoordTexture* dstCopy, bool willReadDstColor);
-
- void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const override;
-
bool onIsEqual(const GrXferProcessor& xpBase) const override {
const PorterDuffXferProcessor& xp = xpBase.cast<PorterDuffXferProcessor>();
if (fSrcBlend != xp.fSrcBlend ||
« no previous file with comments | « src/gpu/effects/GrDisableColorXP.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698