| 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 DidDraw(); | 353 DidDraw(); |
| 354 SetNeedsCompositingUpdate(); | 354 SetNeedsCompositingUpdate(); |
| 355 } | 355 } |
| 356 | 356 |
| 357 void HTMLCanvasElement::RestoreCanvasMatrixClipStack( | 357 void HTMLCanvasElement::RestoreCanvasMatrixClipStack( |
| 358 PaintCanvas* canvas) const { | 358 PaintCanvas* canvas) const { |
| 359 if (context_) | 359 if (context_) |
| 360 context_->RestoreCanvasMatrixClipStack(canvas); | 360 context_->RestoreCanvasMatrixClipStack(canvas); |
| 361 } | 361 } |
| 362 | 362 |
| 363 void HTMLCanvasElement::SetNeedsCompositingUpdate() { |
| 364 Element::SetNeedsCompositingUpdate(); |
| 365 } |
| 366 |
| 363 void HTMLCanvasElement::DoDeferredPaintInvalidation() { | 367 void HTMLCanvasElement::DoDeferredPaintInvalidation() { |
| 364 DCHECK(!dirty_rect_.IsEmpty()); | 368 DCHECK(!dirty_rect_.IsEmpty()); |
| 365 if (Is2d()) { | 369 if (Is2d()) { |
| 366 FloatRect src_rect(0, 0, size().Width(), size().Height()); | 370 FloatRect src_rect(0, 0, size().Width(), size().Height()); |
| 367 dirty_rect_.Intersect(src_rect); | 371 dirty_rect_.Intersect(src_rect); |
| 368 LayoutBox* lb = GetLayoutBox(); | 372 LayoutBox* lb = GetLayoutBox(); |
| 369 FloatRect invalidation_rect; | 373 FloatRect invalidation_rect; |
| 370 if (lb) { | 374 if (lb) { |
| 371 FloatRect mapped_dirty_rect = | 375 FloatRect mapped_dirty_rect = |
| 372 MapRect(dirty_rect_, src_rect, FloatRect(lb->ContentBoxRect())); | 376 MapRect(dirty_rect_, src_rect, FloatRect(lb->ContentBoxRect())); |
| (...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1480 // Creates a placeholder layer first before Surface is created. | 1484 // Creates a placeholder layer first before Surface is created. |
| 1481 surface_layer_bridge_->CreateSolidColorLayer(); | 1485 surface_layer_bridge_->CreateSolidColorLayer(); |
| 1482 } | 1486 } |
| 1483 } | 1487 } |
| 1484 | 1488 |
| 1485 void HTMLCanvasElement::OnWebLayerReplaced() { | 1489 void HTMLCanvasElement::OnWebLayerReplaced() { |
| 1486 SetNeedsCompositingUpdate(); | 1490 SetNeedsCompositingUpdate(); |
| 1487 } | 1491 } |
| 1488 | 1492 |
| 1489 } // namespace blink | 1493 } // namespace blink |
| OLD | NEW |