| OLD | NEW |
| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 EXPECT_EQ(a->texture_size, b->texture_size); | 193 EXPECT_EQ(a->texture_size, b->texture_size); |
| 194 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); | 194 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); |
| 195 } | 195 } |
| 196 | 196 |
| 197 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { | 197 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { |
| 198 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); | 198 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); |
| 199 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); | 199 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); |
| 200 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); | 200 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); |
| 201 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); | 201 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); |
| 202 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); | 202 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); |
| 203 EXPECT_EQ(a->color_space, b->color_space); |
| 203 } | 204 } |
| 204 | 205 |
| 205 void Compare(const TransferableResource& a, const TransferableResource& b) { | 206 void Compare(const TransferableResource& a, const TransferableResource& b) { |
| 206 EXPECT_EQ(a.id, b.id); | 207 EXPECT_EQ(a.id, b.id); |
| 207 EXPECT_EQ(a.format, b.format); | 208 EXPECT_EQ(a.format, b.format); |
| 208 EXPECT_EQ(a.filter, b.filter); | 209 EXPECT_EQ(a.filter, b.filter); |
| 209 EXPECT_EQ(a.size.ToString(), b.size.ToString()); | 210 EXPECT_EQ(a.size.ToString(), b.size.ToString()); |
| 210 for (size_t i = 0; i < arraysize(a.mailbox_holder.mailbox.name); ++i) { | 211 for (size_t i = 0; i < arraysize(a.mailbox_holder.mailbox.name); ++i) { |
| 211 EXPECT_EQ(a.mailbox_holder.mailbox.name[i], | 212 EXPECT_EQ(a.mailbox_holder.mailbox.name[i], |
| 212 b.mailbox_holder.mailbox.name[i]); | 213 b.mailbox_holder.mailbox.name[i]); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 SkXfermode::Mode arbitrary_blend_mode2 = SkXfermode::kLighten_Mode; | 253 SkXfermode::Mode arbitrary_blend_mode2 = SkXfermode::kLighten_Mode; |
| 253 SkXfermode::Mode arbitrary_blend_mode3 = SkXfermode::kOverlay_Mode; | 254 SkXfermode::Mode arbitrary_blend_mode3 = SkXfermode::kOverlay_Mode; |
| 254 IOSurfaceDrawQuad::Orientation arbitrary_orientation = | 255 IOSurfaceDrawQuad::Orientation arbitrary_orientation = |
| 255 IOSurfaceDrawQuad::UNFLIPPED; | 256 IOSurfaceDrawQuad::UNFLIPPED; |
| 256 RenderPass::Id arbitrary_id(10, 14); | 257 RenderPass::Id arbitrary_id(10, 14); |
| 257 ResourceProvider::ResourceId arbitrary_resourceid1 = 55; | 258 ResourceProvider::ResourceId arbitrary_resourceid1 = 55; |
| 258 ResourceProvider::ResourceId arbitrary_resourceid2 = 47; | 259 ResourceProvider::ResourceId arbitrary_resourceid2 = 47; |
| 259 ResourceProvider::ResourceId arbitrary_resourceid3 = 23; | 260 ResourceProvider::ResourceId arbitrary_resourceid3 = 23; |
| 260 ResourceProvider::ResourceId arbitrary_resourceid4 = 16; | 261 ResourceProvider::ResourceId arbitrary_resourceid4 = 16; |
| 261 SkScalar arbitrary_sigma = SkFloatToScalar(2.0f); | 262 SkScalar arbitrary_sigma = SkFloatToScalar(2.0f); |
| 263 YUVVideoDrawQuad::ColorSpace arbitrary_color_space = |
| 264 YUVVideoDrawQuad::kRec601; |
| 262 | 265 |
| 263 FilterOperations arbitrary_filters1; | 266 FilterOperations arbitrary_filters1; |
| 264 arbitrary_filters1.Append(FilterOperation::CreateGrayscaleFilter( | 267 arbitrary_filters1.Append(FilterOperation::CreateGrayscaleFilter( |
| 265 arbitrary_float1)); | 268 arbitrary_float1)); |
| 266 skia::RefPtr<SkImageFilter> arbitrary_filter = skia::AdoptRef( | 269 skia::RefPtr<SkImageFilter> arbitrary_filter = skia::AdoptRef( |
| 267 new SkBlurImageFilter(arbitrary_sigma, arbitrary_sigma)); | 270 new SkBlurImageFilter(arbitrary_sigma, arbitrary_sigma)); |
| 268 arbitrary_filters1.Append( | 271 arbitrary_filters1.Append( |
| 269 cc::FilterOperation::CreateReferenceFilter(arbitrary_filter)); | 272 cc::FilterOperation::CreateReferenceFilter(arbitrary_filter)); |
| 270 | 273 |
| 271 FilterOperations arbitrary_filters2; | 274 FilterOperations arbitrary_filters2; |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 YUVVideoDrawQuad::Create(); | 426 YUVVideoDrawQuad::Create(); |
| 424 yuvvideo_in->SetAll(shared_state3_in.get(), | 427 yuvvideo_in->SetAll(shared_state3_in.get(), |
| 425 arbitrary_rect1, | 428 arbitrary_rect1, |
| 426 arbitrary_rect2_inside_rect1, | 429 arbitrary_rect2_inside_rect1, |
| 427 arbitrary_rect1_inside_rect1, | 430 arbitrary_rect1_inside_rect1, |
| 428 arbitrary_bool1, | 431 arbitrary_bool1, |
| 429 arbitrary_rectf1, | 432 arbitrary_rectf1, |
| 430 arbitrary_resourceid1, | 433 arbitrary_resourceid1, |
| 431 arbitrary_resourceid2, | 434 arbitrary_resourceid2, |
| 432 arbitrary_resourceid3, | 435 arbitrary_resourceid3, |
| 433 arbitrary_resourceid4); | 436 arbitrary_resourceid4, |
| 437 arbitrary_color_space); |
| 434 scoped_ptr<DrawQuad> yuvvideo_cmp = yuvvideo_in->Copy( | 438 scoped_ptr<DrawQuad> yuvvideo_cmp = yuvvideo_in->Copy( |
| 435 yuvvideo_in->shared_quad_state); | 439 yuvvideo_in->shared_quad_state); |
| 436 | 440 |
| 437 scoped_ptr<RenderPass> pass_in = RenderPass::Create(); | 441 scoped_ptr<RenderPass> pass_in = RenderPass::Create(); |
| 438 pass_in->SetAll(arbitrary_id, | 442 pass_in->SetAll(arbitrary_id, |
| 439 arbitrary_rect1, | 443 arbitrary_rect1, |
| 440 arbitrary_rect2, | 444 arbitrary_rect2, |
| 441 arbitrary_matrix, | 445 arbitrary_matrix, |
| 442 arbitrary_bool1); | 446 arbitrary_bool1); |
| 443 | 447 |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 SoftwareFrameData frame_out; | 812 SoftwareFrameData frame_out; |
| 809 PickleIterator iter(msg); | 813 PickleIterator iter(msg); |
| 810 EXPECT_EQ( | 814 EXPECT_EQ( |
| 811 expect_read, | 815 expect_read, |
| 812 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); | 816 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); |
| 813 } | 817 } |
| 814 } | 818 } |
| 815 | 819 |
| 816 } // namespace | 820 } // namespace |
| 817 } // namespace content | 821 } // namespace content |
| OLD | NEW |