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

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

Issue 865383003: Consolidate callers to scheduleVisualUpdate. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/frame/FrameView.cpp ('k') | sky/engine/core/rendering/RenderImageResource.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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 271 }
272 272
273 setSurfaceSize(newSize); 273 setSurfaceSize(newSize);
274 274
275 if (m_context && m_context->is3d() && oldSize != size()) 275 if (m_context && m_context->is3d() && oldSize != size())
276 toWebGLRenderingContext(m_context.get())->reshape(width(), height()); 276 toWebGLRenderingContext(m_context.get())->reshape(width(), height());
277 277
278 if (RenderObject* renderer = this->renderer()) { 278 if (RenderObject* renderer = this->renderer()) {
279 if (renderer->isCanvas()) { 279 if (renderer->isCanvas()) {
280 if (hadImageBuffer) 280 if (hadImageBuffer)
281 renderer->scheduleVisualUpdate(); 281 document().scheduleVisualUpdate();
282 } 282 }
283 } 283 }
284 284
285 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); 285 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end();
286 for (HashSet<RawPtr<CanvasObserver> >::iterator it = m_observers.begin(); it != end; ++it) 286 for (HashSet<RawPtr<CanvasObserver> >::iterator it = m_observers.begin(); it != end; ++it)
287 (*it)->canvasResized(this); 287 (*it)->canvasResized(this);
288 } 288 }
289 289
290 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const 290 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const
291 { 291 {
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 } 658 }
659 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); 659 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled);
660 } 660 }
661 661
662 FloatSize HTMLCanvasElement::sourceSize() const 662 FloatSize HTMLCanvasElement::sourceSize() const
663 { 663 {
664 return FloatSize(width(), height()); 664 return FloatSize(width(), height());
665 } 665 }
666 666
667 } 667 }
OLDNEW
« no previous file with comments | « sky/engine/core/frame/FrameView.cpp ('k') | sky/engine/core/rendering/RenderImageResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698