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

Side by Side Diff: content/common/cc_messages_unittest.cc

Issue 394193003: Implement HiDPI and pinch-zoom scaling of filter params (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra headers; unneeded code in tests Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/cc_messages.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/cc_messages.h" 5 #include "content/common/cc_messages.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 EXPECT_EQ(a->filters.size(), b->filters.size()); 151 EXPECT_EQ(a->filters.size(), b->filters.size());
152 for (size_t i = 0; i < a->filters.size(); ++i) { 152 for (size_t i = 0; i < a->filters.size(); ++i) {
153 if (a->filters.at(i).type() != cc::FilterOperation::REFERENCE) { 153 if (a->filters.at(i).type() != cc::FilterOperation::REFERENCE) {
154 EXPECT_EQ(a->filters.at(i), b->filters.at(i)); 154 EXPECT_EQ(a->filters.at(i), b->filters.at(i));
155 } else { 155 } else {
156 EXPECT_EQ(b->filters.at(i).type(), cc::FilterOperation::REFERENCE); 156 EXPECT_EQ(b->filters.at(i).type(), cc::FilterOperation::REFERENCE);
157 EXPECT_EQ(a->filters.at(i).image_filter()->countInputs(), 157 EXPECT_EQ(a->filters.at(i).image_filter()->countInputs(),
158 b->filters.at(i).image_filter()->countInputs()); 158 b->filters.at(i).image_filter()->countInputs());
159 } 159 }
160 } 160 }
161 EXPECT_EQ(a->filters_scale, b->filters_scale);
161 EXPECT_EQ(a->background_filters, b->background_filters); 162 EXPECT_EQ(a->background_filters, b->background_filters);
162 } 163 }
163 164
164 void Compare(const SolidColorDrawQuad* a, const SolidColorDrawQuad* b) { 165 void Compare(const SolidColorDrawQuad* a, const SolidColorDrawQuad* b) {
165 EXPECT_EQ(a->color, b->color); 166 EXPECT_EQ(a->color, b->color);
166 EXPECT_EQ(a->force_anti_aliasing_off, b->force_anti_aliasing_off); 167 EXPECT_EQ(a->force_anti_aliasing_off, b->force_anti_aliasing_off);
167 } 168 }
168 169
169 void Compare(const StreamVideoDrawQuad* a, const StreamVideoDrawQuad* b) { 170 void Compare(const StreamVideoDrawQuad* a, const StreamVideoDrawQuad* b) {
170 EXPECT_EQ(a->resource_id, b->resource_id); 171 EXPECT_EQ(a->resource_id, b->resource_id);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 gfx::Rect arbitrary_rect3(7, -53, 22, 19); 236 gfx::Rect arbitrary_rect3(7, -53, 22, 19);
236 gfx::Rect arbitrary_rect1_inside_rect3(10, -40, 6, 3); 237 gfx::Rect arbitrary_rect1_inside_rect3(10, -40, 6, 3);
237 gfx::Rect arbitrary_rect2_inside_rect3(12, -51, 5, 12); 238 gfx::Rect arbitrary_rect2_inside_rect3(12, -51, 5, 12);
238 gfx::Size arbitrary_size1(15, 19); 239 gfx::Size arbitrary_size1(15, 19);
239 gfx::Size arbitrary_size2(3, 99); 240 gfx::Size arbitrary_size2(3, 99);
240 gfx::Size arbitrary_size3(75, 1281); 241 gfx::Size arbitrary_size3(75, 1281);
241 gfx::RectF arbitrary_rectf1(4.2f, -922.1f, 15.6f, 29.5f); 242 gfx::RectF arbitrary_rectf1(4.2f, -922.1f, 15.6f, 29.5f);
242 gfx::SizeF arbitrary_sizef1(15.2f, 104.6f); 243 gfx::SizeF arbitrary_sizef1(15.2f, 104.6f);
243 gfx::PointF arbitrary_pointf1(31.4f, 15.9f); 244 gfx::PointF arbitrary_pointf1(31.4f, 15.9f);
244 gfx::PointF arbitrary_pointf2(26.5f, -35.8f); 245 gfx::PointF arbitrary_pointf2(26.5f, -35.8f);
246 gfx::Vector2dF arbitrary_vector2df1(16.2f, -85.1f);
245 float arbitrary_float1 = 0.7f; 247 float arbitrary_float1 = 0.7f;
246 float arbitrary_float2 = 0.3f; 248 float arbitrary_float2 = 0.3f;
247 float arbitrary_float3 = 0.9f; 249 float arbitrary_float3 = 0.9f;
248 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f}; 250 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f};
249 bool arbitrary_bool1 = true; 251 bool arbitrary_bool1 = true;
250 bool arbitrary_bool2 = false; 252 bool arbitrary_bool2 = false;
251 bool arbitrary_bool3 = true; 253 bool arbitrary_bool3 = true;
252 int arbitrary_context_id1 = 12; 254 int arbitrary_context_id1 = 12;
253 int arbitrary_context_id2 = 57; 255 int arbitrary_context_id2 = 57;
254 int arbitrary_context_id3 = -503; 256 int arbitrary_context_id3 = -503;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 arbitrary_rect1, 365 arbitrary_rect1,
364 arbitrary_rect2_inside_rect1, 366 arbitrary_rect2_inside_rect1,
365 arbitrary_rect1_inside_rect1, 367 arbitrary_rect1_inside_rect1,
366 arbitrary_bool1, 368 arbitrary_bool1,
367 arbitrary_id, 369 arbitrary_id,
368 arbitrary_bool2, 370 arbitrary_bool2,
369 arbitrary_resourceid2, 371 arbitrary_resourceid2,
370 arbitrary_rect1, 372 arbitrary_rect1,
371 arbitrary_rectf1, 373 arbitrary_rectf1,
372 arbitrary_filters1, 374 arbitrary_filters1,
375 arbitrary_vector2df1,
373 arbitrary_filters2); 376 arbitrary_filters2);
374 pass_cmp->CopyFromAndAppendRenderPassDrawQuad( 377 pass_cmp->CopyFromAndAppendRenderPassDrawQuad(
375 renderpass_in, 378 renderpass_in,
376 renderpass_in->shared_quad_state, 379 renderpass_in->shared_quad_state,
377 renderpass_in->render_pass_id); 380 renderpass_in->render_pass_id);
378 381
379 SharedQuadState* shared_state3_in = pass_in->CreateAndAppendSharedQuadState(); 382 SharedQuadState* shared_state3_in = pass_in->CreateAndAppendSharedQuadState();
380 shared_state3_in->SetAll(arbitrary_matrix, 383 shared_state3_in->SetAll(arbitrary_matrix,
381 arbitrary_size3, 384 arbitrary_size3,
382 arbitrary_rect3, 385 arbitrary_rect3,
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 SoftwareFrameData frame_out; 804 SoftwareFrameData frame_out;
802 PickleIterator iter(msg); 805 PickleIterator iter(msg);
803 EXPECT_EQ( 806 EXPECT_EQ(
804 expect_read, 807 expect_read,
805 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); 808 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out));
806 } 809 }
807 } 810 }
808 811
809 } // namespace 812 } // namespace
810 } // namespace content 813 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cc_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698