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

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

Issue 191123002: Implement hidpi and pinch-zoom scaling of filter params in cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove TODO Created 6 years, 9 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 gfx::Rect arbitrary_rect3(7, -53, 22, 19); 226 gfx::Rect arbitrary_rect3(7, -53, 22, 19);
227 gfx::Rect arbitrary_rect1_inside_rect3(10, -40, 6, 3); 227 gfx::Rect arbitrary_rect1_inside_rect3(10, -40, 6, 3);
228 gfx::Rect arbitrary_rect2_inside_rect3(12, -51, 5, 12); 228 gfx::Rect arbitrary_rect2_inside_rect3(12, -51, 5, 12);
229 gfx::Size arbitrary_size1(15, 19); 229 gfx::Size arbitrary_size1(15, 19);
230 gfx::Size arbitrary_size2(3, 99); 230 gfx::Size arbitrary_size2(3, 99);
231 gfx::Size arbitrary_size3(75, 1281); 231 gfx::Size arbitrary_size3(75, 1281);
232 gfx::RectF arbitrary_rectf1(4.2f, -922.1f, 15.6f, 29.5f); 232 gfx::RectF arbitrary_rectf1(4.2f, -922.1f, 15.6f, 29.5f);
233 gfx::SizeF arbitrary_sizef1(15.2f, 104.6f); 233 gfx::SizeF arbitrary_sizef1(15.2f, 104.6f);
234 gfx::PointF arbitrary_pointf1(31.4f, 15.9f); 234 gfx::PointF arbitrary_pointf1(31.4f, 15.9f);
235 gfx::PointF arbitrary_pointf2(26.5f, -35.8f); 235 gfx::PointF arbitrary_pointf2(26.5f, -35.8f);
236 gfx::Vector2dF arbitrary_vector2df1(16.2f, -85.1f);
236 float arbitrary_float1 = 0.7f; 237 float arbitrary_float1 = 0.7f;
237 float arbitrary_float2 = 0.3f; 238 float arbitrary_float2 = 0.3f;
238 float arbitrary_float3 = 0.9f; 239 float arbitrary_float3 = 0.9f;
239 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f}; 240 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f};
240 bool arbitrary_bool1 = true; 241 bool arbitrary_bool1 = true;
241 bool arbitrary_bool2 = false; 242 bool arbitrary_bool2 = false;
242 bool arbitrary_bool3 = true; 243 bool arbitrary_bool3 = true;
243 int arbitrary_int = 5; 244 int arbitrary_int = 5;
244 SkColor arbitrary_color = SkColorSetARGB(25, 36, 47, 58); 245 SkColor arbitrary_color = SkColorSetARGB(25, 36, 47, 58);
245 SkXfermode::Mode arbitrary_blend_mode1 = SkXfermode::kScreen_Mode; 246 SkXfermode::Mode arbitrary_blend_mode1 = SkXfermode::kScreen_Mode;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 arbitrary_rect1, 329 arbitrary_rect1,
329 arbitrary_rect2_inside_rect1, 330 arbitrary_rect2_inside_rect1,
330 arbitrary_rect1_inside_rect1, 331 arbitrary_rect1_inside_rect1,
331 arbitrary_bool1, 332 arbitrary_bool1,
332 arbitrary_id, 333 arbitrary_id,
333 arbitrary_bool2, 334 arbitrary_bool2,
334 arbitrary_resourceid2, 335 arbitrary_resourceid2,
335 arbitrary_rect1, 336 arbitrary_rect1,
336 arbitrary_rectf1, 337 arbitrary_rectf1,
337 arbitrary_filters1, 338 arbitrary_filters1,
339 arbitrary_vector2df1,
338 arbitrary_filters2); 340 arbitrary_filters2);
339 scoped_ptr<RenderPassDrawQuad> renderpass_cmp = renderpass_in->Copy( 341 scoped_ptr<RenderPassDrawQuad> renderpass_cmp = renderpass_in->Copy(
340 renderpass_in->shared_quad_state, renderpass_in->render_pass_id); 342 renderpass_in->shared_quad_state, renderpass_in->render_pass_id);
341 343
342 scoped_ptr<SharedQuadState> shared_state3_in = SharedQuadState::Create(); 344 scoped_ptr<SharedQuadState> shared_state3_in = SharedQuadState::Create();
343 shared_state3_in->SetAll(arbitrary_matrix, 345 shared_state3_in->SetAll(arbitrary_matrix,
344 arbitrary_size3, 346 arbitrary_size3,
345 arbitrary_rect3, 347 arbitrary_rect3,
346 arbitrary_rect1, 348 arbitrary_rect1,
347 arbitrary_bool1, 349 arbitrary_bool1,
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 } 739 }
738 740
739 // Verify the largest DrawQuad type is RenderPassDrawQuad. If this ever 741 // Verify the largest DrawQuad type is RenderPassDrawQuad. If this ever
740 // changes, then the ReserveSizeForRenderPassWrite() method needs to be 742 // changes, then the ReserveSizeForRenderPassWrite() method needs to be
741 // updated as well to use the new largest quad. 743 // updated as well to use the new largest quad.
742 EXPECT_EQ(sizeof(RenderPassDrawQuad), largest); 744 EXPECT_EQ(sizeof(RenderPassDrawQuad), largest);
743 } 745 }
744 746
745 } // namespace 747 } // namespace
746 } // namespace content 748 } // 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