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

Unified Diff: include/gpu/SkGr.h

Issue 45363002: Fix for issue 1728: raster vs. gpu text draws with the wrong color (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Missed a color conversion Created 7 years, 2 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: include/gpu/SkGr.h
diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h
index 5e5ca4b72c30f898bb9c07d829f3824f8ef652be..743cfbaef590c0127f5648bdac8ff895d4104b4a 100644
--- a/include/gpu/SkGr.h
+++ b/include/gpu/SkGr.h
@@ -60,6 +60,14 @@ static inline GrColor SkColor2GrColor(SkColor c) {
return GrColorPackRGBA(r, g, b, a);
}
+static inline GrColor SkColor2GrColorNoPremultiply(SkColor c) {
+ unsigned r = SkColorGetR(c);
+ unsigned g = SkColorGetG(c);
+ unsigned b = SkColorGetB(c);
+ unsigned a = SkColorGetA(c);
+ return GrColorPackRGBA(r, g, b, a);
+}
+
////////////////////////////////////////////////////////////////////////////////
bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams*);

Powered by Google App Engine
This is Rietveld 408576698