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

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

Issue 2699713005: Fix missing finalizeFrame barriers in WebGL animations (Closed)
Patch Set: Comments + readability improvements Created 3 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
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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } else { 321 } else {
322 m_dirtyRect.unite(rect); 322 m_dirtyRect.unite(rect);
323 } 323 }
324 if (m_context && m_context->is2d() && hasImageBuffer()) 324 if (m_context && m_context->is2d() && hasImageBuffer())
325 buffer()->didDraw(rect); 325 buffer()->didDraw(rect);
326 } 326 }
327 327
328 void HTMLCanvasElement::finalizeFrame() { 328 void HTMLCanvasElement::finalizeFrame() {
329 if (hasImageBuffer()) 329 if (hasImageBuffer())
330 m_imageBuffer->finalizeFrame(); 330 m_imageBuffer->finalizeFrame();
331 m_context->incrementFrameCount();
332 notifyListenersCanvasChanged(); 331 notifyListenersCanvasChanged();
333 } 332 }
334 333
335 void HTMLCanvasElement::didDisableAcceleration() { 334 void HTMLCanvasElement::didDisableAcceleration() {
336 // We must force a paint invalidation on the canvas even if it's 335 // We must force a paint invalidation on the canvas even if it's
337 // content did not change because it layer was destroyed. 336 // content did not change because it layer was destroyed.
338 didDraw(FloatRect(0, 0, size().width(), size().height())); 337 didDraw(FloatRect(0, 0, size().width(), size().height()));
339 } 338 }
340 339
341 void HTMLCanvasElement::restoreCanvasMatrixClipStack(SkCanvas* canvas) const { 340 void HTMLCanvasElement::restoreCanvasMatrixClipStack(SkCanvas* canvas) const {
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 // Creates a placeholder layer first before Surface is created. 1440 // Creates a placeholder layer first before Surface is created.
1442 m_surfaceLayerBridge->createSolidColorLayer(); 1441 m_surfaceLayerBridge->createSolidColorLayer();
1443 } 1442 }
1444 } 1443 }
1445 1444
1446 void HTMLCanvasElement::OnWebLayerReplaced() { 1445 void HTMLCanvasElement::OnWebLayerReplaced() {
1447 setNeedsCompositingUpdate(); 1446 setNeedsCompositingUpdate();
1448 } 1447 }
1449 1448
1450 } // namespace blink 1449 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698