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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 13097006: Add interface to SkXfermode to return a GrEffect and blend coeffs. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Add SkGpuDevice.cpp Created 7 years, 9 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
« src/core/SkXfermode.cpp ('K') | « src/core/SkXfermode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
===================================================================
--- src/gpu/SkGpuDevice.cpp (revision 8410)
+++ src/gpu/SkGpuDevice.cpp (working copy)
@@ -484,13 +484,15 @@
SkXfermode::Coeff dm = SkXfermode::kISA_Coeff;
SkXfermode* mode = skPaint.getXfermode();
- if (mode) {
- if (!mode->asCoeff(&sm, &dm)) {
- //SkDEBUGCODE(SkDebugf("Unsupported xfer mode.\n");)
+ GrEffectRef* xferEffect;
+ if (SkXfermode::AsNewEffect(mode, dev->context(), &xferEffect, &sm, &dm)) {
+ // We're not ready for xfermode effects yet
+ GrAssert(NULL == xferEffect);
+ } else {
+ //SkDEBUGCODE(SkDebugf("Unsupported xfer mode.\n");)
#if 0
- return false;
+ return false;
#endif
- }
}
grPaint->setBlendFunc(sk_blend_to_grblend(sm), sk_blend_to_grblend(dm));
« src/core/SkXfermode.cpp ('K') | « src/core/SkXfermode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698