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

Unified Diff: content/common/cc_messages_unittest.cc

Issue 21271002: Added SkImageFilter serialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« content/common/cc_messages.cc ('K') | « content/common/cc_messages.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/cc_messages_unittest.cc
diff --git a/content/common/cc_messages_unittest.cc b/content/common/cc_messages_unittest.cc
index 0537a5ad0a7e486de29fd1c307ee617f07f4aeba..bfbf5205482cf9c526e9a71f67c6cfe0c5b529f0 100644
--- a/content/common/cc_messages_unittest.cc
+++ b/content/common/cc_messages_unittest.cc
@@ -9,6 +9,7 @@
#include "cc/output/compositor_frame.h"
#include "ipc/ipc_message.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/skia/include/effects/SkBlurImageFilter.h"
using cc::CheckerboardDrawQuad;
using cc::DelegatedFrameData;
@@ -220,6 +221,7 @@ TEST_F(CCMessagesTest, AllQuads) {
ResourceProvider::ResourceId arbitrary_resourceid2 = 47;
ResourceProvider::ResourceId arbitrary_resourceid3 = 23;
ResourceProvider::ResourceId arbitrary_resourceid4 = 16;
+ SkScalar arbitrary_sigma = SkFloatToScalar(2.0f);
FilterOperations arbitrary_filters1;
arbitrary_filters1.Append(FilterOperation::CreateGrayscaleFilter(
@@ -229,8 +231,8 @@ TEST_F(CCMessagesTest, AllQuads) {
arbitrary_filters2.Append(FilterOperation::CreateBrightnessFilter(
arbitrary_float2));
- // TODO(danakj): filter is not serialized.
- skia::RefPtr<SkImageFilter> arbitrary_filter;
+ skia::RefPtr<SkImageFilter> arbitrary_filter = skia::AdoptRef(
+ new SkBlurImageFilter(arbitrary_sigma, arbitrary_sigma));
scoped_ptr<SharedQuadState> shared_state1_in = SharedQuadState::Create();
shared_state1_in->SetAll(arbitrary_matrix,
@@ -290,7 +292,7 @@ TEST_F(CCMessagesTest, AllQuads) {
arbitrary_rect1,
arbitrary_rectf1,
arbitrary_filters1,
- arbitrary_filter, // TODO(piman): not serialized.
+ arbitrary_filter,
arbitrary_filters2);
scoped_ptr<RenderPassDrawQuad> renderpass_cmp = renderpass_in->Copy(
renderpass_in->shared_quad_state, renderpass_in->render_pass_id);
« content/common/cc_messages.cc ('K') | « content/common/cc_messages.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698