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 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1814 } | 1814 } |
1815 | 1815 |
1816 void GraphicsContext::setCompositeOperation(CompositeOperator compositeOperation
, BlendMode blendMode) | 1816 void GraphicsContext::setCompositeOperation(CompositeOperator compositeOperation
, BlendMode blendMode) |
1817 { | 1817 { |
1818 m_state.compositeOperator = compositeOperation; | 1818 m_state.compositeOperator = compositeOperation; |
1819 m_state.blendMode = blendMode; | 1819 m_state.blendMode = blendMode; |
1820 | 1820 |
1821 if (paintingDisabled()) | 1821 if (paintingDisabled()) |
1822 return; | 1822 return; |
1823 | 1823 |
1824 m_skiaState->m_xferMode = WebCoreCompositeToSkiaComposite(compositeOperation
); | 1824 m_skiaState->m_xferMode = WebCoreCompositeToSkiaComposite(compositeOperation
, blendMode); |
1825 } | 1825 } |
1826 | 1826 |
1827 CompositeOperator GraphicsContext::compositeOperation() const | 1827 CompositeOperator GraphicsContext::compositeOperation() const |
1828 { | 1828 { |
1829 return m_state.compositeOperator; | 1829 return m_state.compositeOperator; |
1830 } | 1830 } |
1831 | 1831 |
1832 BlendMode GraphicsContext::blendModeOperation() const | 1832 BlendMode GraphicsContext::blendModeOperation() const |
1833 { | 1833 { |
1834 return m_state.blendMode; | 1834 return m_state.blendMode; |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 SkPaint paint; | 2121 SkPaint paint; |
2122 paint.setXfermodeMode(SkXfermode::kDstIn_Mode); | 2122 paint.setXfermodeMode(SkXfermode::kDstIn_Mode); |
2123 realizeSave(SkCanvas::kMatrixClip_SaveFlag); | 2123 realizeSave(SkCanvas::kMatrixClip_SaveFlag); |
2124 m_canvas->save(SkCanvas::kMatrix_SaveFlag); | 2124 m_canvas->save(SkCanvas::kMatrix_SaveFlag); |
2125 m_canvas->resetMatrix(); | 2125 m_canvas->resetMatrix(); |
2126 m_canvas->drawBitmapRect(imageBuffer, 0, rect, &paint); | 2126 m_canvas->drawBitmapRect(imageBuffer, 0, rect, &paint); |
2127 m_canvas->restore(); | 2127 m_canvas->restore(); |
2128 } | 2128 } |
2129 | 2129 |
2130 } | 2130 } |
OLD | NEW |