| 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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 bool CanvasRenderingContext2D::hasImageBuffer() const | 578 bool CanvasRenderingContext2D::hasImageBuffer() const |
| 579 { | 579 { |
| 580 return canvas()->hasImageBuffer(); | 580 return canvas()->hasImageBuffer(); |
| 581 } | 581 } |
| 582 | 582 |
| 583 ImageBuffer* CanvasRenderingContext2D::imageBuffer() const | 583 ImageBuffer* CanvasRenderingContext2D::imageBuffer() const |
| 584 { | 584 { |
| 585 return canvas()->buffer(); | 585 return canvas()->buffer(); |
| 586 } | 586 } |
| 587 | 587 |
| 588 PassRefPtr<Image> blink::CanvasRenderingContext2D::getImage(SnapshotReason reaso
n) const |
| 589 { |
| 590 if (!hasImageBuffer()) |
| 591 return nullptr; |
| 592 return canvas()->buffer()->newImageSnapshot(PreferAcceleration, reason); |
| 593 } |
| 594 |
| 588 bool CanvasRenderingContext2D::parseColorOrCurrentColor(Color& color, const Stri
ng& colorString) const | 595 bool CanvasRenderingContext2D::parseColorOrCurrentColor(Color& color, const Stri
ng& colorString) const |
| 589 { | 596 { |
| 590 return ::blink::parseColorOrCurrentColor(color, colorString, canvas()); | 597 return ::blink::parseColorOrCurrentColor(color, colorString, canvas()); |
| 591 } | 598 } |
| 592 | 599 |
| 593 HitTestCanvasResult* CanvasRenderingContext2D::getControlAndIdIfHitRegionExists(
const LayoutPoint& location) | 600 HitTestCanvasResult* CanvasRenderingContext2D::getControlAndIdIfHitRegionExists(
const LayoutPoint& location) |
| 594 { | 601 { |
| 595 if (hitRegionsCount() <= 0) | 602 if (hitRegionsCount() <= 0) |
| 596 return HitTestCanvasResult::create(String(), nullptr); | 603 return HitTestCanvasResult::create(String(), nullptr); |
| 597 | 604 |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 return true; | 1097 return true; |
| 1091 } | 1098 } |
| 1092 | 1099 |
| 1093 void CanvasRenderingContext2D::resetUsageTracking() | 1100 void CanvasRenderingContext2D::resetUsageTracking() |
| 1094 { | 1101 { |
| 1095 UsageCounters newCounters; | 1102 UsageCounters newCounters; |
| 1096 m_usageCounters = newCounters; | 1103 m_usageCounters = newCounters; |
| 1097 } | 1104 } |
| 1098 | 1105 |
| 1099 } // namespace blink | 1106 } // namespace blink |
| OLD | NEW |