| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 // will not get called, so we need to take care of business here. | 344 // will not get called, so we need to take care of business here. |
| 345 if (!did_notify_listeners_for_current_frame_) | 345 if (!did_notify_listeners_for_current_frame_) |
| 346 NotifyListenersCanvasChanged(); | 346 NotifyListenersCanvasChanged(); |
| 347 did_notify_listeners_for_current_frame_ = false; | 347 did_notify_listeners_for_current_frame_ = false; |
| 348 } | 348 } |
| 349 | 349 |
| 350 void HTMLCanvasElement::DidDisableAcceleration() { | 350 void HTMLCanvasElement::DidDisableAcceleration() { |
| 351 // We must force a paint invalidation on the canvas even if it's | 351 // We must force a paint invalidation on the canvas even if it's |
| 352 // content did not change because it layer was destroyed. | 352 // content did not change because it layer was destroyed. |
| 353 DidDraw(); | 353 DidDraw(); |
| 354 SetNeedsCompositingUpdate(); |
| 354 } | 355 } |
| 355 | 356 |
| 356 void HTMLCanvasElement::RestoreCanvasMatrixClipStack( | 357 void HTMLCanvasElement::RestoreCanvasMatrixClipStack( |
| 357 PaintCanvas* canvas) const { | 358 PaintCanvas* canvas) const { |
| 358 if (context_) | 359 if (context_) |
| 359 context_->RestoreCanvasMatrixClipStack(canvas); | 360 context_->RestoreCanvasMatrixClipStack(canvas); |
| 360 } | 361 } |
| 361 | 362 |
| 362 void HTMLCanvasElement::DoDeferredPaintInvalidation() { | 363 void HTMLCanvasElement::DoDeferredPaintInvalidation() { |
| 363 DCHECK(!dirty_rect_.IsEmpty()); | 364 DCHECK(!dirty_rect_.IsEmpty()); |
| (...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1476 // Creates a placeholder layer first before Surface is created. | 1477 // Creates a placeholder layer first before Surface is created. |
| 1477 surface_layer_bridge_->CreateSolidColorLayer(); | 1478 surface_layer_bridge_->CreateSolidColorLayer(); |
| 1478 } | 1479 } |
| 1479 } | 1480 } |
| 1480 | 1481 |
| 1481 void HTMLCanvasElement::OnWebLayerReplaced() { | 1482 void HTMLCanvasElement::OnWebLayerReplaced() { |
| 1482 SetNeedsCompositingUpdate(); | 1483 SetNeedsCompositingUpdate(); |
| 1483 } | 1484 } |
| 1484 | 1485 |
| 1485 } // namespace blink | 1486 } // namespace blink |
| OLD | NEW |