| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2012 Google Inc. All rights reserved. | 2  * Copyright (C) 2012 Google Inc. All rights reserved. | 
| 3  * | 3  * | 
| 4  * Redistribution and use in source and binary forms, with or without | 4  * Redistribution and use in source and binary forms, with or without | 
| 5  * modification, are permitted provided that the following conditions | 5  * modification, are permitted provided that the following conditions | 
| 6  * are met: | 6  * are met: | 
| 7  * 1.  Redistributions of source code must retain the above copyright | 7  * 1.  Redistributions of source code must retain the above copyright | 
| 8  *     notice, this list of conditions and the following disclaimer. | 8  *     notice, this list of conditions and the following disclaimer. | 
| 9  * 2.  Redistributions in binary form must reproduce the above copyright | 9  * 2.  Redistributions in binary form must reproduce the above copyright | 
| 10  *     notice, this list of conditions and the following disclaimer in the | 10  *     notice, this list of conditions and the following disclaimer in the | 
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 128     // Clip to the left edge of the opaque area. | 128     // Clip to the left edge of the opaque area. | 
| 129     context.clip(IntRect(10, 10, 10, 40)); | 129     context.clip(IntRect(10, 10, 10, 40)); | 
| 130 | 130 | 
| 131     // Draw a path that gets clipped. This should destroy the opaque area but on
     ly inside the clip. | 131     // Draw a path that gets clipped. This should destroy the opaque area but on
     ly inside the clip. | 
| 132     Path path; | 132     Path path; | 
| 133     path.moveTo(FloatPoint(10, 10)); | 133     path.moveTo(FloatPoint(10, 10)); | 
| 134     path.addLineTo(FloatPoint(40, 40)); | 134     path.addLineTo(FloatPoint(40, 40)); | 
| 135     SkPaint paint; | 135     SkPaint paint; | 
| 136     paint.setColor(alpha.rgb()); | 136     paint.setColor(alpha.rgb()); | 
| 137     paint.setXfermodeMode(SkXfermode::kSrcOut_Mode); | 137     paint.setXfermodeMode(SkXfermode::kSrcOut_Mode); | 
| 138     context.drawPath(path.skPath(), paint); | 138     context.drawPath(path.getSkPath(), paint); | 
| 139 | 139 | 
| 140     picture = context.endRecording(); | 140     picture = context.endRecording(); | 
| 141     canvas.drawPicture(picture.get()); | 141     canvas.drawPicture(picture.get()); | 
| 142     EXPECT_OPAQUE_PIXELS_IN_RECT(bitmap, IntRect(20, 10, 30, 40)); | 142     EXPECT_OPAQUE_PIXELS_IN_RECT(bitmap, IntRect(20, 10, 30, 40)); | 
| 143 } | 143 } | 
| 144 | 144 | 
| 145 } // namespace blink | 145 } // namespace blink | 
| OLD | NEW | 
|---|