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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 RefPtr<const SkPicture> tilePicture = builder.endRecording(); | 58 RefPtr<const SkPicture> tilePicture = builder.endRecording(); |
59 | 59 |
60 AffineTransform patternTransform; | 60 AffineTransform patternTransform; |
61 patternTransform.translate(phase.x(), phase.y()); | 61 patternTransform.translate(phase.x(), phase.y()); |
62 patternTransform.scale(scale.width(), scale.height()); | 62 patternTransform.scale(scale.width(), scale.height()); |
63 patternTransform.translate(tileRect.x(), tileRect.y()); | 63 patternTransform.translate(tileRect.x(), tileRect.y()); |
64 | 64 |
65 RefPtr<Pattern> picturePattern = Pattern::createPicturePattern(tilePicture); | 65 RefPtr<Pattern> picturePattern = Pattern::createPicturePattern(tilePicture); |
66 picturePattern->setPatternSpaceTransform(patternTransform); | 66 picturePattern->setPatternSpaceTransform(patternTransform); |
67 | 67 |
68 GraphicsContextStateSaver saver(*destContext); | 68 SkPaint fillPaint = destContext->fillPaint(); |
69 destContext->setFillPattern(picturePattern); | 69 fillPaint.setShader(picturePattern->shader()); |
70 destContext->fillRect(destRect, destContext->fillColor(), compositeOp); | 70 fillPaint.setColor(SK_ColorBLACK); |
| 71 fillPaint.setXfermodeMode(compositeOp); |
| 72 |
| 73 destContext->drawRect(destRect, fillPaint); |
71 } | 74 } |
72 | 75 |
73 } // namespace blink | 76 } // namespace blink |
OLD | NEW |