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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 if (hRule == Image::StretchTile && vRule == Image::StretchTile) { | 1036 if (hRule == Image::StretchTile && vRule == Image::StretchTile) { |
1037 // Just do a scale. | 1037 // Just do a scale. |
1038 drawImage(image, dest, srcRect, op); | 1038 drawImage(image, dest, srcRect, op); |
1039 return; | 1039 return; |
1040 } | 1040 } |
1041 | 1041 |
1042 image->drawTiled(this, dest, srcRect, tileScaleFactor, hRule, vRule, op); | 1042 image->drawTiled(this, dest, srcRect, tileScaleFactor, hRule, vRule, op); |
1043 } | 1043 } |
1044 | 1044 |
1045 void GraphicsContext::drawImageBuffer(ImageBuffer* image, const FloatRect& dest, | 1045 void GraphicsContext::drawImageBuffer(ImageBuffer* image, const FloatRect& dest, |
1046 const FloatRect* src, CompositeOperator op) | 1046 const FloatRect* src, CompositeOperator op, WebBlendMode blendMode) |
1047 { | 1047 { |
1048 if (contextDisabled() || !image) | 1048 if (contextDisabled() || !image) |
1049 return; | 1049 return; |
1050 | 1050 |
1051 image->draw(this, dest, src, op); | 1051 image->draw(this, dest, src, op, blendMode); |
1052 } | 1052 } |
1053 | 1053 |
1054 void GraphicsContext::drawPicture(PassRefPtr<SkPicture> picture, const FloatRect
& dest, const FloatRect& src, CompositeOperator op, WebBlendMode blendMode) | 1054 void GraphicsContext::drawPicture(PassRefPtr<SkPicture> picture, const FloatRect
& dest, const FloatRect& src, CompositeOperator op, WebBlendMode blendMode) |
1055 { | 1055 { |
1056 if (contextDisabled() || !picture) | 1056 if (contextDisabled() || !picture) |
1057 return; | 1057 return; |
1058 | 1058 |
1059 SkPaint picturePaint; | 1059 SkPaint picturePaint; |
1060 picturePaint.setXfermode(WebCoreCompositeToSkiaComposite(op, blendMode).get(
)); | 1060 picturePaint.setXfermode(WebCoreCompositeToSkiaComposite(op, blendMode).get(
)); |
1061 SkRect skBounds = WebCoreFloatRectToSKRect(dest); | 1061 SkRect skBounds = WebCoreFloatRectToSKRect(dest); |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 // being returned from computeInterpolationQuality. | 1896 // being returned from computeInterpolationQuality. |
1897 resampling = InterpolationLow; | 1897 resampling = InterpolationLow; |
1898 } | 1898 } |
1899 resampling = limitInterpolationQuality(this, resampling); | 1899 resampling = limitInterpolationQuality(this, resampling); |
1900 | 1900 |
1901 bool useBicubicFilter = resampling == InterpolationHigh; | 1901 bool useBicubicFilter = resampling == InterpolationHigh; |
1902 paint->setFilterLevel(convertToSkiaFilterLevel(useBicubicFilter, resampling)
); | 1902 paint->setFilterLevel(convertToSkiaFilterLevel(useBicubicFilter, resampling)
); |
1903 } | 1903 } |
1904 | 1904 |
1905 } | 1905 } |
OLD | NEW |