| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 if (hRule == Image::StretchTile && vRule == Image::StretchTile) { | 1037 if (hRule == Image::StretchTile && vRule == Image::StretchTile) { |
| 1038 // Just do a scale. | 1038 // Just do a scale. |
| 1039 drawImage(image, dest, srcRect, op); | 1039 drawImage(image, dest, srcRect, op); |
| 1040 return; | 1040 return; |
| 1041 } | 1041 } |
| 1042 | 1042 |
| 1043 image->drawTiled(this, dest, srcRect, tileScaleFactor, hRule, vRule, op); | 1043 image->drawTiled(this, dest, srcRect, tileScaleFactor, hRule, vRule, op); |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 void GraphicsContext::drawImageBuffer(ImageBuffer* image, const FloatRect& dest, | 1046 void GraphicsContext::drawImageBuffer(ImageBuffer* image, const FloatRect& dest, |
| 1047 const FloatRect* src, CompositeOperator op) | 1047 const FloatRect* src, CompositeOperator op, WebBlendMode blendMode) |
| 1048 { | 1048 { |
| 1049 if (contextDisabled() || !image) | 1049 if (contextDisabled() || !image) |
| 1050 return; | 1050 return; |
| 1051 | 1051 |
| 1052 image->draw(this, dest, src, op); | 1052 image->draw(this, dest, src, op, blendMode); |
| 1053 } | 1053 } |
| 1054 | 1054 |
| 1055 void GraphicsContext::drawPicture(PassRefPtr<SkPicture> picture, const FloatRect
& dest, const FloatRect& src, CompositeOperator op, WebBlendMode blendMode) | 1055 void GraphicsContext::drawPicture(PassRefPtr<SkPicture> picture, const FloatRect
& dest, const FloatRect& src, CompositeOperator op, WebBlendMode blendMode) |
| 1056 { | 1056 { |
| 1057 if (contextDisabled() || !picture) | 1057 if (contextDisabled() || !picture) |
| 1058 return; | 1058 return; |
| 1059 | 1059 |
| 1060 SkPaint picturePaint; | 1060 SkPaint picturePaint; |
| 1061 picturePaint.setXfermode(WebCoreCompositeToSkiaComposite(op, blendMode).get(
)); | 1061 picturePaint.setXfermode(WebCoreCompositeToSkiaComposite(op, blendMode).get(
)); |
| 1062 SkRect skBounds = WebCoreFloatRectToSKRect(dest); | 1062 SkRect skBounds = WebCoreFloatRectToSKRect(dest); |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 | 1850 |
| 1851 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) | 1851 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) |
| 1852 { | 1852 { |
| 1853 if (m_trackTextRegion) { | 1853 if (m_trackTextRegion) { |
| 1854 TRACE_EVENT0("skia", "GraphicsContext::didDrawTextInRect"); | 1854 TRACE_EVENT0("skia", "GraphicsContext::didDrawTextInRect"); |
| 1855 m_textRegion.join(textRect); | 1855 m_textRegion.join(textRect); |
| 1856 } | 1856 } |
| 1857 } | 1857 } |
| 1858 | 1858 |
| 1859 } | 1859 } |
| OLD | NEW |