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

Unified Diff: cc/render_pass.cc

Issue 11175009: Implement SkImageFilter support in the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODOs; comment out OVERRIDE. Created 8 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: cc/render_pass.cc
diff --git a/cc/render_pass.cc b/cc/render_pass.cc
index d628c0d130054b7c6467a76ca89b8d23350c08af..5bb1a9049233e3efa010a836b4ec8c9d459e5160 100644
--- a/cc/render_pass.cc
+++ b/cc/render_pass.cc
@@ -12,6 +12,7 @@
#include "CCQuadCuller.h"
#include "CCSharedQuadState.h"
#include "CCSolidColorDrawQuad.h"
+#include "SkImageFilter.h"
using WebKit::WebTransformationMatrix;
@@ -28,6 +29,7 @@ CCRenderPass::CCRenderPass(Id id, IntRect outputRect, const WebKit::WebTransform
, m_outputRect(outputRect)
, m_hasTransparentBackground(true)
, m_hasOcclusionFromOutsideTargetSurface(false)
+ , m_filter(0)
{
DCHECK(id.layerId > 0);
DCHECK(id.index >= 0);
@@ -47,6 +49,7 @@ scoped_ptr<CCRenderPass> CCRenderPass::copy(Id newId) const
copyPass->setHasOcclusionFromOutsideTargetSurface(m_hasOcclusionFromOutsideTargetSurface);
copyPass->setFilters(m_filters);
copyPass->setBackgroundFilters(m_backgroundFilters);
+ copyPass->setFilter(m_filter);
return copyPass.Pass();
}
@@ -103,4 +106,8 @@ void CCRenderPass::appendQuadsToFillScreen(CCLayerImpl* rootLayer, SkColor scree
}
}
+void CCRenderPass::setFilter(SkImageFilter* filter) {
+ SkRefCnt_SafeAssign(m_filter, filter);
+}
danakj 2012/10/19 19:34:24 Same question as james, who frees this one?
Stephen White 2012/10/19 21:34:50 Done.
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698