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 25 matching lines...) Expand all Loading... |
36 #include "core/dom/Document.h" | 36 #include "core/dom/Document.h" |
37 #include "core/dom/ExceptionCode.h" | 37 #include "core/dom/ExceptionCode.h" |
38 #include "core/frame/LocalFrame.h" | 38 #include "core/frame/LocalFrame.h" |
39 #include "core/frame/Settings.h" | 39 #include "core/frame/Settings.h" |
40 #include "core/html/ImageData.h" | 40 #include "core/html/ImageData.h" |
41 #include "core/html/canvas/Canvas2DContextAttributes.h" | 41 #include "core/html/canvas/Canvas2DContextAttributes.h" |
42 #include "core/html/canvas/CanvasRenderingContext2D.h" | 42 #include "core/html/canvas/CanvasRenderingContext2D.h" |
43 #include "core/html/canvas/WebGLContextAttributes.h" | 43 #include "core/html/canvas/WebGLContextAttributes.h" |
44 #include "core/html/canvas/WebGLContextEvent.h" | 44 #include "core/html/canvas/WebGLContextEvent.h" |
45 #include "core/html/canvas/WebGLRenderingContext.h" | 45 #include "core/html/canvas/WebGLRenderingContext.h" |
| 46 #include "core/layout/Layer.h" |
46 #include "core/rendering/RenderHTMLCanvas.h" | 47 #include "core/rendering/RenderHTMLCanvas.h" |
47 #include "core/rendering/RenderLayer.h" | |
48 #include "platform/MIMETypeRegistry.h" | 48 #include "platform/MIMETypeRegistry.h" |
49 #include "platform/RuntimeEnabledFeatures.h" | 49 #include "platform/RuntimeEnabledFeatures.h" |
50 #include "platform/graphics/BitmapImage.h" | 50 #include "platform/graphics/BitmapImage.h" |
51 #include "platform/graphics/Canvas2DImageBufferSurface.h" | 51 #include "platform/graphics/Canvas2DImageBufferSurface.h" |
52 #include "platform/graphics/GraphicsContextStateSaver.h" | 52 #include "platform/graphics/GraphicsContextStateSaver.h" |
53 #include "platform/graphics/ImageBuffer.h" | 53 #include "platform/graphics/ImageBuffer.h" |
54 #include "platform/graphics/RecordingImageBufferSurface.h" | 54 #include "platform/graphics/RecordingImageBufferSurface.h" |
55 #include "platform/graphics/StaticBitmapImage.h" | 55 #include "platform/graphics/StaticBitmapImage.h" |
56 #include "platform/graphics/UnacceleratedImageBufferSurface.h" | 56 #include "platform/graphics/UnacceleratedImageBufferSurface.h" |
57 #include "platform/graphics/gpu/WebGLImageBufferSurface.h" | 57 #include "platform/graphics/gpu/WebGLImageBufferSurface.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 { | 273 { |
274 if (m_dirtyRect.isEmpty()) | 274 if (m_dirtyRect.isEmpty()) |
275 return; | 275 return; |
276 | 276 |
277 // Propagate the m_dirtyRect accumulated so far to the compositor | 277 // Propagate the m_dirtyRect accumulated so far to the compositor |
278 // before restarting with a blank dirty rect. | 278 // before restarting with a blank dirty rect. |
279 FloatRect srcRect(0, 0, size().width(), size().height()); | 279 FloatRect srcRect(0, 0, size().width(), size().height()); |
280 m_dirtyRect.intersect(srcRect); | 280 m_dirtyRect.intersect(srcRect); |
281 if (RenderBox* ro = renderBox()) { | 281 if (RenderBox* ro = renderBox()) { |
282 FloatRect mappedDirtyRect = mapRect(m_dirtyRect, srcRect, ro->contentBox
Rect()); | 282 FloatRect mappedDirtyRect = mapRect(m_dirtyRect, srcRect, ro->contentBox
Rect()); |
283 // For querying RenderLayer::compositingState() | 283 // For querying Layer::compositingState() |
284 // FIXME: is this invalidation using the correct compositing state? | 284 // FIXME: is this invalidation using the correct compositing state? |
285 DisableCompositingQueryAsserts disabler; | 285 DisableCompositingQueryAsserts disabler; |
286 ro->invalidatePaintRectangle(enclosingIntRect(mappedDirtyRect)); | 286 ro->invalidatePaintRectangle(enclosingIntRect(mappedDirtyRect)); |
287 } | 287 } |
288 notifyObserversCanvasChanged(m_dirtyRect); | 288 notifyObserversCanvasChanged(m_dirtyRect); |
289 m_dirtyRect = FloatRect(); | 289 m_dirtyRect = FloatRect(); |
290 } | 290 } |
291 | 291 |
292 void HTMLCanvasElement::restoreCanvasMatrixClipStack() | 292 void HTMLCanvasElement::restoreCanvasMatrixClipStack() |
293 { | 293 { |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 { | 836 { |
837 return !originClean(); | 837 return !originClean(); |
838 } | 838 } |
839 | 839 |
840 FloatSize HTMLCanvasElement::sourceSize() const | 840 FloatSize HTMLCanvasElement::sourceSize() const |
841 { | 841 { |
842 return FloatSize(width(), height()); | 842 return FloatSize(width(), height()); |
843 } | 843 } |
844 | 844 |
845 } | 845 } |
OLD | NEW |