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

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

Issue 558083002: [cc] Add nearest neighbor filtering for TextureLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase Created 6 years 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
« no previous file with comments | « content/common/cc_messages.h ('k') | mojo/converters/surfaces/surfaces_type_converters.cc » ('j') | 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 EXPECT_EQ(a->resource_id, b->resource_id); 179 EXPECT_EQ(a->resource_id, b->resource_id);
180 EXPECT_EQ(a->premultiplied_alpha, b->premultiplied_alpha); 180 EXPECT_EQ(a->premultiplied_alpha, b->premultiplied_alpha);
181 EXPECT_EQ(a->uv_top_left, b->uv_top_left); 181 EXPECT_EQ(a->uv_top_left, b->uv_top_left);
182 EXPECT_EQ(a->uv_bottom_right, b->uv_bottom_right); 182 EXPECT_EQ(a->uv_bottom_right, b->uv_bottom_right);
183 EXPECT_EQ(a->background_color, b->background_color); 183 EXPECT_EQ(a->background_color, b->background_color);
184 EXPECT_EQ(a->vertex_opacity[0], b->vertex_opacity[0]); 184 EXPECT_EQ(a->vertex_opacity[0], b->vertex_opacity[0]);
185 EXPECT_EQ(a->vertex_opacity[1], b->vertex_opacity[1]); 185 EXPECT_EQ(a->vertex_opacity[1], b->vertex_opacity[1]);
186 EXPECT_EQ(a->vertex_opacity[2], b->vertex_opacity[2]); 186 EXPECT_EQ(a->vertex_opacity[2], b->vertex_opacity[2]);
187 EXPECT_EQ(a->vertex_opacity[3], b->vertex_opacity[3]); 187 EXPECT_EQ(a->vertex_opacity[3], b->vertex_opacity[3]);
188 EXPECT_EQ(a->flipped, b->flipped); 188 EXPECT_EQ(a->flipped, b->flipped);
189 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor);
189 } 190 }
190 191
191 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { 192 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) {
192 EXPECT_EQ(a->resource_id, b->resource_id); 193 EXPECT_EQ(a->resource_id, b->resource_id);
193 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); 194 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect);
194 EXPECT_EQ(a->texture_size, b->texture_size); 195 EXPECT_EQ(a->texture_size, b->texture_size);
195 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); 196 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents);
196 } 197 }
197 198
198 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { 199 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 gfx::PointF arbitrary_pointf2(26.5f, -35.8f); 245 gfx::PointF arbitrary_pointf2(26.5f, -35.8f);
245 gfx::Vector2dF arbitrary_vector2df1(16.2f, -85.1f); 246 gfx::Vector2dF arbitrary_vector2df1(16.2f, -85.1f);
246 gfx::Vector2dF arbitrary_vector2df2(-8.3f, 0.47f); 247 gfx::Vector2dF arbitrary_vector2df2(-8.3f, 0.47f);
247 float arbitrary_float1 = 0.7f; 248 float arbitrary_float1 = 0.7f;
248 float arbitrary_float2 = 0.3f; 249 float arbitrary_float2 = 0.3f;
249 float arbitrary_float3 = 0.9f; 250 float arbitrary_float3 = 0.9f;
250 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f}; 251 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f};
251 bool arbitrary_bool1 = true; 252 bool arbitrary_bool1 = true;
252 bool arbitrary_bool2 = false; 253 bool arbitrary_bool2 = false;
253 bool arbitrary_bool3 = true; 254 bool arbitrary_bool3 = true;
255 bool arbitrary_bool4 = true;
254 int arbitrary_context_id1 = 12; 256 int arbitrary_context_id1 = 12;
255 int arbitrary_context_id2 = 57; 257 int arbitrary_context_id2 = 57;
256 int arbitrary_context_id3 = -503; 258 int arbitrary_context_id3 = -503;
257 int arbitrary_int = 5; 259 int arbitrary_int = 5;
258 SkColor arbitrary_color = SkColorSetARGB(25, 36, 47, 58); 260 SkColor arbitrary_color = SkColorSetARGB(25, 36, 47, 58);
259 SkXfermode::Mode arbitrary_blend_mode1 = SkXfermode::kScreen_Mode; 261 SkXfermode::Mode arbitrary_blend_mode1 = SkXfermode::kScreen_Mode;
260 SkXfermode::Mode arbitrary_blend_mode2 = SkXfermode::kLighten_Mode; 262 SkXfermode::Mode arbitrary_blend_mode2 = SkXfermode::kLighten_Mode;
261 SkXfermode::Mode arbitrary_blend_mode3 = SkXfermode::kOverlay_Mode; 263 SkXfermode::Mode arbitrary_blend_mode3 = SkXfermode::kOverlay_Mode;
262 IOSurfaceDrawQuad::Orientation arbitrary_orientation = 264 IOSurfaceDrawQuad::Orientation arbitrary_orientation =
263 IOSurfaceDrawQuad::UNFLIPPED; 265 IOSurfaceDrawQuad::UNFLIPPED;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 arbitrary_rect2, 435 arbitrary_rect2,
434 arbitrary_rect2_inside_rect2, 436 arbitrary_rect2_inside_rect2,
435 arbitrary_rect1_inside_rect2, 437 arbitrary_rect1_inside_rect2,
436 arbitrary_bool1, 438 arbitrary_bool1,
437 arbitrary_resourceid1, 439 arbitrary_resourceid1,
438 arbitrary_bool2, 440 arbitrary_bool2,
439 arbitrary_pointf1, 441 arbitrary_pointf1,
440 arbitrary_pointf2, 442 arbitrary_pointf2,
441 arbitrary_color, 443 arbitrary_color,
442 arbitrary_float_array, 444 arbitrary_float_array,
443 arbitrary_bool3); 445 arbitrary_bool3,
446 arbitrary_bool4);
444 pass_cmp->CopyFromAndAppendDrawQuad(texture_in, 447 pass_cmp->CopyFromAndAppendDrawQuad(texture_in,
445 texture_in->shared_quad_state); 448 texture_in->shared_quad_state);
446 449
447 TileDrawQuad* tile_in = pass_in->CreateAndAppendDrawQuad<TileDrawQuad>(); 450 TileDrawQuad* tile_in = pass_in->CreateAndAppendDrawQuad<TileDrawQuad>();
448 tile_in->SetAll(shared_state3_in, 451 tile_in->SetAll(shared_state3_in,
449 arbitrary_rect2, 452 arbitrary_rect2,
450 arbitrary_rect2_inside_rect2, 453 arbitrary_rect2_inside_rect2,
451 arbitrary_rect1_inside_rect2, 454 arbitrary_rect1_inside_rect2,
452 arbitrary_bool1, 455 arbitrary_bool1,
453 arbitrary_resourceid3, 456 arbitrary_resourceid3,
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 SoftwareFrameData frame_out; 770 SoftwareFrameData frame_out;
768 PickleIterator iter(msg); 771 PickleIterator iter(msg);
769 EXPECT_EQ( 772 EXPECT_EQ(
770 expect_read, 773 expect_read,
771 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); 774 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out));
772 } 775 }
773 } 776 }
774 777
775 } // namespace 778 } // namespace
776 } // namespace content 779 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cc_messages.h ('k') | mojo/converters/surfaces/surfaces_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698