| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "cc/layers/content_layer_client.h" | 8 #include "cc/layers/content_layer_client.h" |
| 9 #include "cc/layers/picture_image_layer.h" | 9 #include "cc/layers/picture_image_layer.h" |
| 10 #include "cc/layers/picture_layer.h" | 10 #include "cc/layers/picture_layer.h" |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 picture_vertical->SetBounds(picture_bounds); | 305 picture_vertical->SetBounds(picture_bounds); |
| 306 picture_vertical->SetIsDrawable(true); | 306 picture_vertical->SetIsDrawable(true); |
| 307 | 307 |
| 308 CheckerContentLayerClient picture_client_horizontal( | 308 CheckerContentLayerClient picture_client_horizontal( |
| 309 picture_bounds, SK_ColorMAGENTA, false); | 309 picture_bounds, SK_ColorMAGENTA, false); |
| 310 scoped_refptr<PictureLayer> picture_horizontal = | 310 scoped_refptr<PictureLayer> picture_horizontal = |
| 311 PictureLayer::Create(&picture_client_horizontal); | 311 PictureLayer::Create(&picture_client_horizontal); |
| 312 picture_horizontal->SetBounds(picture_bounds); | 312 picture_horizontal->SetBounds(picture_bounds); |
| 313 picture_horizontal->SetIsDrawable(true); | 313 picture_horizontal->SetIsDrawable(true); |
| 314 picture_horizontal->SetContentsOpaque(false); | 314 picture_horizontal->SetContentsOpaque(false); |
| 315 picture_horizontal->SetBlendMode(SkXfermode::kMultiply_Mode); | 315 picture_horizontal->SetBlendMode(SkBlendMode::kMultiply); |
| 316 | 316 |
| 317 background->AddChild(picture_vertical); | 317 background->AddChild(picture_vertical); |
| 318 background->AddChild(picture_horizontal); | 318 background->AddChild(picture_horizontal); |
| 319 | 319 |
| 320 gfx::Size mask_bounds(128, 128); | 320 gfx::Size mask_bounds(128, 128); |
| 321 CircleContentLayerClient mask_client(mask_bounds); | 321 CircleContentLayerClient mask_client(mask_bounds); |
| 322 scoped_refptr<PictureLayer> mask = PictureLayer::Create(&mask_client); | 322 scoped_refptr<PictureLayer> mask = PictureLayer::Create(&mask_client); |
| 323 mask->SetBounds(mask_bounds); | 323 mask->SetBounds(mask_bounds); |
| 324 mask->SetIsDrawable(true); | 324 mask->SetIsDrawable(true); |
| 325 mask->SetIsMask(true); | 325 mask->SetIsMask(true); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 340 | 340 |
| 341 RunPixelResourceTest(background, | 341 RunPixelResourceTest(background, |
| 342 base::FilePath( | 342 base::FilePath( |
| 343 FILE_PATH_LITERAL("mask_of_layer_with_blend.png"))); | 343 FILE_PATH_LITERAL("mask_of_layer_with_blend.png"))); |
| 344 } | 344 } |
| 345 | 345 |
| 346 } // namespace | 346 } // namespace |
| 347 } // namespace cc | 347 } // namespace cc |
| 348 | 348 |
| 349 #endif // !defined(OS_ANDROID) | 349 #endif // !defined(OS_ANDROID) |
| OLD | NEW |