| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
| 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
| 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. | 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. |
| 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 10 * | 10 * |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "core/css/CSSFontSelector.h" | 40 #include "core/css/CSSFontSelector.h" |
| 41 #include "core/css/StylePropertySet.h" | 41 #include "core/css/StylePropertySet.h" |
| 42 #include "core/css/parser/CSSParser.h" | 42 #include "core/css/parser/CSSParser.h" |
| 43 #include "core/css/resolver/StyleResolver.h" | 43 #include "core/css/resolver/StyleResolver.h" |
| 44 #include "core/dom/ExceptionCode.h" | 44 #include "core/dom/ExceptionCode.h" |
| 45 #include "core/dom/StyleEngine.h" | 45 #include "core/dom/StyleEngine.h" |
| 46 #include "core/events/Event.h" | 46 #include "core/events/Event.h" |
| 47 #include "core/fetch/ImageResource.h" | 47 #include "core/fetch/ImageResource.h" |
| 48 #include "core/frame/ImageBitmap.h" | 48 #include "core/frame/ImageBitmap.h" |
| 49 #include "core/frame/Settings.h" | 49 #include "core/frame/Settings.h" |
| 50 #include "core/frame/UseCounter.h" | |
| 51 #include "core/html/HTMLCanvasElement.h" | 50 #include "core/html/HTMLCanvasElement.h" |
| 52 #include "core/html/HTMLImageElement.h" | 51 #include "core/html/HTMLImageElement.h" |
| 53 #include "core/html/HTMLMediaElement.h" | 52 #include "core/html/HTMLMediaElement.h" |
| 54 #include "core/html/HTMLVideoElement.h" | 53 #include "core/html/HTMLVideoElement.h" |
| 55 #include "core/html/ImageData.h" | 54 #include "core/html/ImageData.h" |
| 56 #include "core/html/TextMetrics.h" | 55 #include "core/html/TextMetrics.h" |
| 57 #include "core/html/canvas/CanvasGradient.h" | 56 #include "core/html/canvas/CanvasGradient.h" |
| 58 #include "core/html/canvas/CanvasPattern.h" | 57 #include "core/html/canvas/CanvasPattern.h" |
| 59 #include "core/html/canvas/CanvasStyle.h" | 58 #include "core/html/canvas/CanvasStyle.h" |
| 60 #include "core/html/canvas/Path2D.h" | 59 #include "core/html/canvas/Path2D.h" |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 { | 758 { |
| 760 return compositeOperatorName(state().m_globalComposite, state().m_globalBlen
d); | 759 return compositeOperatorName(state().m_globalComposite, state().m_globalBlen
d); |
| 761 } | 760 } |
| 762 | 761 |
| 763 void CanvasRenderingContext2D::setGlobalCompositeOperation(const String& operati
on) | 762 void CanvasRenderingContext2D::setGlobalCompositeOperation(const String& operati
on) |
| 764 { | 763 { |
| 765 CompositeOperator op = CompositeSourceOver; | 764 CompositeOperator op = CompositeSourceOver; |
| 766 WebBlendMode blendMode = WebBlendModeNormal; | 765 WebBlendMode blendMode = WebBlendModeNormal; |
| 767 if (!parseCompositeAndBlendOperator(operation, op, blendMode)) | 766 if (!parseCompositeAndBlendOperator(operation, op, blendMode)) |
| 768 return; | 767 return; |
| 769 // crbug.com/425628: Count the use of "darker" to remove it. | |
| 770 if (op == CompositePlusDarker) | |
| 771 UseCounter::count(canvas()->document(), UseCounter::CanvasRenderingConte
xt2DCompositeOperationDarker); | |
| 772 if ((state().m_globalComposite == op) && (state().m_globalBlend == blendMode
)) | 768 if ((state().m_globalComposite == op) && (state().m_globalBlend == blendMode
)) |
| 773 return; | 769 return; |
| 774 GraphicsContext* c = drawingContext(); | 770 GraphicsContext* c = drawingContext(); |
| 775 realizeSaves(c); | 771 realizeSaves(c); |
| 776 modifiableState().m_globalComposite = op; | 772 modifiableState().m_globalComposite = op; |
| 777 modifiableState().m_globalBlend = blendMode; | 773 modifiableState().m_globalBlend = blendMode; |
| 778 if (!c) | 774 if (!c) |
| 779 return; | 775 return; |
| 780 c->setCompositeOperation(op, blendMode); | 776 c->setCompositeOperation(op, blendMode); |
| 781 } | 777 } |
| (...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2377 | 2373 |
| 2378 unsigned CanvasRenderingContext2D::hitRegionsCount() const | 2374 unsigned CanvasRenderingContext2D::hitRegionsCount() const |
| 2379 { | 2375 { |
| 2380 if (m_hitRegionManager) | 2376 if (m_hitRegionManager) |
| 2381 return m_hitRegionManager->getHitRegionsCount(); | 2377 return m_hitRegionManager->getHitRegionsCount(); |
| 2382 | 2378 |
| 2383 return 0; | 2379 return 0; |
| 2384 } | 2380 } |
| 2385 | 2381 |
| 2386 } // namespace blink | 2382 } // namespace blink |
| OLD | NEW |