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

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: Updated to ToT (past the Great Renaming) 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
« no previous file with comments | « cc/render_pass.h ('k') | cc/render_pass_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/render_pass.cc
diff --git a/cc/render_pass.cc b/cc/render_pass.cc
index d791b50357410020604bd19f91fb11f696caaf12..6fc1be708c8e4798ed48e24b2e7775feeb53703b 100644
--- a/cc/render_pass.cc
+++ b/cc/render_pass.cc
@@ -12,6 +12,7 @@
#include "cc/quad_culler.h"
#include "cc/shared_quad_state.h"
#include "cc/solid_color_draw_quad.h"
+#include "third_party/skia/include/core/SkImageFilter.h"
using WebKit::WebTransformationMatrix;
@@ -28,6 +29,7 @@ RenderPass::RenderPass(Id id, gfx::Rect outputRect, const WebKit::WebTransformat
, m_outputRect(outputRect)
, m_hasTransparentBackground(true)
, m_hasOcclusionFromOutsideTargetSurface(false)
+ , m_filter(0)
{
DCHECK(id.layerId > 0);
DCHECK(id.index >= 0);
@@ -35,6 +37,7 @@ RenderPass::RenderPass(Id id, gfx::Rect outputRect, const WebKit::WebTransformat
RenderPass::~RenderPass()
{
+ SkSafeUnref(m_filter);
}
scoped_ptr<RenderPass> RenderPass::copy(Id newId) const
@@ -47,6 +50,7 @@ scoped_ptr<RenderPass> RenderPass::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 +107,8 @@ void RenderPass::appendQuadsToFillScreen(LayerImpl* rootLayer, SkColor screenBac
}
}
+void RenderPass::setFilter(SkImageFilter* filter) {
+ SkRefCnt_SafeAssign(m_filter, filter);
+}
+
} // namespace cc
« no previous file with comments | « cc/render_pass.h ('k') | cc/render_pass_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698