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

Side by Side Diff: sky/engine/core/html/HTMLCanvasElement.cpp

Issue 842113005: Delete a bunch of noop paint invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix comment Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/html/HTMLCanvasElement.h ('k') | sky/engine/core/loader/EmptyClients.h » ('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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 { 209 {
210 if (m_dirtyRect.isEmpty()) 210 if (m_dirtyRect.isEmpty())
211 return; 211 return;
212 m_finalizeFrameTask.Cancel(); 212 m_finalizeFrameTask.Cancel();
213 m_dirtyRect = FloatRect(); 213 m_dirtyRect = FloatRect();
214 } 214 }
215 215
216 void HTMLCanvasElement::finalizeFrameMicrotask() 216 void HTMLCanvasElement::finalizeFrameMicrotask()
217 { 217 {
218 // This method gets invoked if didDraw was called earlier in the current tas k. 218 // This method gets invoked if didDraw was called earlier in the current tas k.
219 ASSERT(!m_dirtyRect.isEmpty());
220 if (is3D()) { 219 if (is3D()) {
221 didFinalizeFrame(); 220 didFinalizeFrame();
222 } else { 221 } else {
223 ASSERT(hasImageBuffer()); 222 ASSERT(hasImageBuffer());
224 m_imageBuffer->finalizeFrame(m_dirtyRect); 223 m_imageBuffer->finalizeFrame();
225 } 224 }
226 ASSERT(m_dirtyRect.isEmpty());
227 ASSERT(m_finalizeFrameTask.IsCancelled()); 225 ASSERT(m_finalizeFrameTask.IsCancelled());
228 } 226 }
229 227
230 void HTMLCanvasElement::notifyObserversCanvasChanged(const FloatRect& rect) 228 void HTMLCanvasElement::notifyObserversCanvasChanged(const FloatRect& rect)
231 { 229 {
232 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); 230 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end();
233 for (HashSet<RawPtr<CanvasObserver> >::iterator it = m_observers.begin(); it != end; ++it) 231 for (HashSet<RawPtr<CanvasObserver> >::iterator it = m_observers.begin(); it != end; ++it)
234 (*it)->canvasChanged(this, rect); 232 (*it)->canvasChanged(this, rect);
235 } 233 }
236 234
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 } 658 }
661 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); 659 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled);
662 } 660 }
663 661
664 FloatSize HTMLCanvasElement::sourceSize() const 662 FloatSize HTMLCanvasElement::sourceSize() const
665 { 663 {
666 return FloatSize(width(), height()); 664 return FloatSize(width(), height());
667 } 665 }
668 666
669 } 667 }
OLDNEW
« no previous file with comments | « sky/engine/core/html/HTMLCanvasElement.h ('k') | sky/engine/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698