| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> |
| 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 } | 288 } |
| 289 RefPtr<SkPicture> tilePicture = patternPicture.endRecording(); | 289 RefPtr<SkPicture> tilePicture = patternPicture.endRecording(); |
| 290 | 290 |
| 291 SkMatrix patternTransform; | 291 SkMatrix patternTransform; |
| 292 patternTransform.setTranslate(phase.x() + spacedTile.x(), phase.y() + spaced
Tile.y()); | 292 patternTransform.setTranslate(phase.x() + spacedTile.x(), phase.y() + spaced
Tile.y()); |
| 293 | 293 |
| 294 SkPaint paint; | 294 SkPaint paint; |
| 295 paint.setShader(SkShader::MakePictureShader(toSkSp(tilePicture.release()), | 295 paint.setShader(SkShader::MakePictureShader(toSkSp(tilePicture.release()), |
| 296 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &patternTransfor
m, nullptr)); | 296 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &patternTransfor
m, nullptr)); |
| 297 paint.setXfermodeMode(compositeOp); | 297 paint.setXfermodeMode(compositeOp); |
| 298 paint.setColorFilter(context.colorFilter()); | 298 paint.setColorFilter(sk_ref_sp(context.colorFilter())); |
| 299 context.drawRect(dstRect, paint); | 299 context.drawRect(dstRect, paint); |
| 300 } | 300 } |
| 301 | 301 |
| 302 PassRefPtr<SkImage> SVGImage::imageForCurrentFrameForContainer(const KURL& url,
const FloatSize& containerSize) | 302 PassRefPtr<SkImage> SVGImage::imageForCurrentFrameForContainer(const KURL& url,
const FloatSize& containerSize) |
| 303 { | 303 { |
| 304 if (!m_page) | 304 if (!m_page) |
| 305 return nullptr; | 305 return nullptr; |
| 306 | 306 |
| 307 SkPictureRecorder recorder; | 307 SkPictureRecorder recorder; |
| 308 SkCanvas* canvas = recorder.beginRecording(width(), height()); | 308 SkCanvas* canvas = recorder.beginRecording(width(), height()); |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 | 537 |
| 538 return m_page; | 538 return m_page; |
| 539 } | 539 } |
| 540 | 540 |
| 541 String SVGImage::filenameExtension() const | 541 String SVGImage::filenameExtension() const |
| 542 { | 542 { |
| 543 return "svg"; | 543 return "svg"; |
| 544 } | 544 } |
| 545 | 545 |
| 546 } // namespace blink | 546 } // namespace blink |
| OLD | NEW |