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

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

Issue 478433002: Avoid RenderObject::paintInvalidationForWholeRenderer() if possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: TestExpectations Created 6 years, 4 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
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 toWebGLRenderingContext(m_context.get())->reshape(width(), height()); 297 toWebGLRenderingContext(m_context.get())->reshape(width(), height());
298 298
299 if (RenderObject* renderer = this->renderer()) { 299 if (RenderObject* renderer = this->renderer()) {
300 if (renderer->isCanvas()) { 300 if (renderer->isCanvas()) {
301 if (oldSize != size()) { 301 if (oldSize != size()) {
302 toRenderHTMLCanvas(renderer)->canvasSizeChanged(); 302 toRenderHTMLCanvas(renderer)->canvasSizeChanged();
303 if (renderBox() && renderBox()->hasAcceleratedCompositing()) 303 if (renderBox() && renderBox()->hasAcceleratedCompositing())
304 renderBox()->contentChanged(CanvasChanged); 304 renderBox()->contentChanged(CanvasChanged);
305 } 305 }
306 if (hadImageBuffer) 306 if (hadImageBuffer)
307 renderer->paintInvalidationForWholeRenderer(); 307 renderer->setShouldDoFullPaintInvalidation(true);
308 } 308 }
309 } 309 }
310 310
311 WillBeHeapHashSet<RawPtrWillBeWeakMember<CanvasObserver> >::iterator end = m _observers.end(); 311 WillBeHeapHashSet<RawPtrWillBeWeakMember<CanvasObserver> >::iterator end = m _observers.end();
312 for (WillBeHeapHashSet<RawPtrWillBeWeakMember<CanvasObserver> >::iterator it = m_observers.begin(); it != end; ++it) 312 for (WillBeHeapHashSet<RawPtrWillBeWeakMember<CanvasObserver> >::iterator it = m_observers.begin(); it != end; ++it)
313 (*it)->canvasResized(this); 313 (*it)->canvasResized(this);
314 } 314 }
315 315
316 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const 316 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const
317 { 317 {
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 { 740 {
741 return !originClean(); 741 return !originClean();
742 } 742 }
743 743
744 FloatSize HTMLCanvasElement::sourceSize() const 744 FloatSize HTMLCanvasElement::sourceSize() const
745 { 745 {
746 return FloatSize(width(), height()); 746 return FloatSize(width(), height());
747 } 747 }
748 748
749 } 749 }
OLDNEW
« no previous file with comments | « Source/core/editing/InputMethodController.cpp ('k') | Source/core/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698