| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 m_imageBuffer->finalizeFrame(); | 330 m_imageBuffer->finalizeFrame(); |
| 331 notifyListenersCanvasChanged(); | 331 notifyListenersCanvasChanged(); |
| 332 } | 332 } |
| 333 | 333 |
| 334 void HTMLCanvasElement::didDisableAcceleration() { | 334 void HTMLCanvasElement::didDisableAcceleration() { |
| 335 // We must force a paint invalidation on the canvas even if it's | 335 // We must force a paint invalidation on the canvas even if it's |
| 336 // content did not change because it layer was destroyed. | 336 // content did not change because it layer was destroyed. |
| 337 didDraw(FloatRect(0, 0, size().width(), size().height())); | 337 didDraw(FloatRect(0, 0, size().width(), size().height())); |
| 338 } | 338 } |
| 339 | 339 |
| 340 void HTMLCanvasElement::restoreCanvasMatrixClipStack(SkCanvas* canvas) const { | 340 void HTMLCanvasElement::restoreCanvasMatrixClipStack( |
| 341 PaintCanvas* canvas) const { |
| 341 if (m_context) | 342 if (m_context) |
| 342 m_context->restoreCanvasMatrixClipStack(canvas); | 343 m_context->restoreCanvasMatrixClipStack(canvas); |
| 343 } | 344 } |
| 344 | 345 |
| 345 void HTMLCanvasElement::doDeferredPaintInvalidation() { | 346 void HTMLCanvasElement::doDeferredPaintInvalidation() { |
| 346 DCHECK(!m_dirtyRect.isEmpty()); | 347 DCHECK(!m_dirtyRect.isEmpty()); |
| 347 if (m_context->is2d()) { | 348 if (m_context->is2d()) { |
| 348 FloatRect srcRect(0, 0, size().width(), size().height()); | 349 FloatRect srcRect(0, 0, size().width(), size().height()); |
| 349 m_dirtyRect.intersect(srcRect); | 350 m_dirtyRect.intersect(srcRect); |
| 350 LayoutBox* lb = layoutBox(); | 351 LayoutBox* lb = layoutBox(); |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 // Creates a placeholder layer first before Surface is created. | 1455 // Creates a placeholder layer first before Surface is created. |
| 1455 m_surfaceLayerBridge->createSolidColorLayer(); | 1456 m_surfaceLayerBridge->createSolidColorLayer(); |
| 1456 } | 1457 } |
| 1457 } | 1458 } |
| 1458 | 1459 |
| 1459 void HTMLCanvasElement::OnWebLayerReplaced() { | 1460 void HTMLCanvasElement::OnWebLayerReplaced() { |
| 1460 setNeedsCompositingUpdate(); | 1461 setNeedsCompositingUpdate(); |
| 1461 } | 1462 } |
| 1462 | 1463 |
| 1463 } // namespace blink | 1464 } // namespace blink |
| OLD | NEW |