Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: Source/core/html/HTMLCanvasElement.cpp

Issue 898783003: Move rendering/RenderLayer* to layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/Settings.in ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/frame/Settings.in ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698