| 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 SkCanvas* c = canvas()->existingDrawingCanvas(); | 282 SkCanvas* c = canvas()->existingDrawingCanvas(); |
| 283 if (c) { | 283 if (c) { |
| 284 c->resetMatrix(); | 284 c->resetMatrix(); |
| 285 c->clipRect(SkRect::MakeWH(canvas()->width(), canvas()->height()), SkReg
ion::kReplace_Op); | 285 c->clipRect(SkRect::MakeWH(canvas()->width(), canvas()->height()), SkReg
ion::kReplace_Op); |
| 286 } | 286 } |
| 287 validateStateStack(); | 287 validateStateStack(); |
| 288 } | 288 } |
| 289 | 289 |
| 290 void CanvasRenderingContext2D::restoreCanvasMatrixClipStack(SkCanvas* c) const | 290 void CanvasRenderingContext2D::restoreCanvasMatrixClipStack(SkCanvas* c) const |
| 291 { | 291 { |
| 292 if (!c) | 292 restoreMatrixClipStack(c); |
| 293 return; | |
| 294 HeapVector<Member<CanvasRenderingContext2DState>>::const_iterator currState; | |
| 295 ASSERT(m_stateStack.begin() < m_stateStack.end()); | |
| 296 for (currState = m_stateStack.begin(); currState < m_stateStack.end(); currS
tate++) { | |
| 297 c->setMatrix(SkMatrix::I()); | |
| 298 currState->get()->playbackClips(c); | |
| 299 c->setMatrix(affineTransformToSkMatrix(currState->get()->transform())); | |
| 300 c->save(); | |
| 301 } | |
| 302 c->restore(); | |
| 303 } | 293 } |
| 304 | 294 |
| 305 bool CanvasRenderingContext2D::shouldAntialias() const | 295 bool CanvasRenderingContext2D::shouldAntialias() const |
| 306 { | 296 { |
| 307 return state().shouldAntialias(); | 297 return state().shouldAntialias(); |
| 308 } | 298 } |
| 309 | 299 |
| 310 void CanvasRenderingContext2D::setShouldAntialias(bool doAA) | 300 void CanvasRenderingContext2D::setShouldAntialias(bool doAA) |
| 311 { | 301 { |
| 312 modifiableState().setShouldAntialias(doAA); | 302 modifiableState().setShouldAntialias(doAA); |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 | 1050 |
| 1061 unsigned CanvasRenderingContext2D::hitRegionsCount() const | 1051 unsigned CanvasRenderingContext2D::hitRegionsCount() const |
| 1062 { | 1052 { |
| 1063 if (m_hitRegionManager) | 1053 if (m_hitRegionManager) |
| 1064 return m_hitRegionManager->getHitRegionsCount(); | 1054 return m_hitRegionManager->getHitRegionsCount(); |
| 1065 | 1055 |
| 1066 return 0; | 1056 return 0; |
| 1067 } | 1057 } |
| 1068 | 1058 |
| 1069 } // namespace blink | 1059 } // namespace blink |
| OLD | NEW |