Reapply "Refactor setting an SkPaint onto a hwui Layer."

This reverts commit 90d0c75e94a32fb7d993fae69762820aabc2fcbb.

Change-Id: Ie807761231edf7c848b019931dccbf466208c0be
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index 70eeb39..54ce64f 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -131,8 +131,9 @@
     }
 }
 
-void Layer::setPaint(SkPaint* paint) {
+void Layer::setPaint(const SkPaint* paint) {
     OpenGLRenderer::getAlphaAndModeDirect(paint, &alpha, &mode);
+    setColorFilter((paint) ? paint->getColorFilter() : NULL);
 }
 
 void Layer::setColorFilter(SkColorFilter* filter) {