OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1382 | 1382 |
1383 if (!drawingBuffer()->markContentsChanged() && m_markedCanvasDirty) { | 1383 if (!drawingBuffer()->markContentsChanged() && m_markedCanvasDirty) { |
1384 return; | 1384 return; |
1385 } | 1385 } |
1386 | 1386 |
1387 if (!canvas()) | 1387 if (!canvas()) |
1388 return; | 1388 return; |
1389 | 1389 |
1390 LayoutBox* layoutBox = canvas()->layoutBox(); | 1390 LayoutBox* layoutBox = canvas()->layoutBox(); |
1391 if (layoutBox && layoutBox->hasAcceleratedCompositing()) { | 1391 if (layoutBox && layoutBox->hasAcceleratedCompositing()) { |
1392 layoutBox->contentChanged(changeType); | |
1393 } | |
1394 if (!m_markedCanvasDirty) { | |
1392 m_markedCanvasDirty = true; | 1395 m_markedCanvasDirty = true; |
1393 canvas()->clearCopiedImage(); | 1396 IntSize canvasSize = clampedCanvasSize(); |
xlai (Olivia)
2017/02/08 17:58:40
Why is this removed?
Justin Novosad
2017/02/08 18:43:12
Because it was already being called by HTMLCanvasE
| |
1394 layoutBox->contentChanged(changeType); | 1397 didDraw(SkIRect::MakeXYWH(0, 0, canvasSize.width(), canvasSize.height())); |
1395 } else { | |
1396 if (!m_markedCanvasDirty) { | |
1397 m_markedCanvasDirty = true; | |
1398 canvas()->didDraw( | |
1399 FloatRect(FloatPoint(0, 0), FloatSize(clampedCanvasSize()))); | |
1400 } | |
1401 } | 1398 } |
1402 } | 1399 } |
1403 | 1400 |
1404 void WebGLRenderingContextBase::onErrorMessage(const char* message, | 1401 void WebGLRenderingContextBase::onErrorMessage(const char* message, |
1405 int32_t id) { | 1402 int32_t id) { |
1406 if (m_synthesizedErrorsToConsole) | 1403 if (m_synthesizedErrorsToConsole) |
1407 printGLErrorToConsole(message); | 1404 printGLErrorToConsole(message); |
1408 InspectorInstrumentation::didFireWebGLErrorOrWarning(canvas(), message); | 1405 InspectorInstrumentation::didFireWebGLErrorOrWarning(canvas(), message); |
1409 } | 1406 } |
1410 | 1407 |
(...skipping 6427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7838 | 7835 |
7839 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( | 7836 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( |
7840 HTMLCanvasElementOrOffscreenCanvas& result) const { | 7837 HTMLCanvasElementOrOffscreenCanvas& result) const { |
7841 if (canvas()) | 7838 if (canvas()) |
7842 result.setHTMLCanvasElement(canvas()); | 7839 result.setHTMLCanvasElement(canvas()); |
7843 else | 7840 else |
7844 result.setOffscreenCanvas(offscreenCanvas()); | 7841 result.setOffscreenCanvas(offscreenCanvas()); |
7845 } | 7842 } |
7846 | 7843 |
7847 } // namespace blink | 7844 } // namespace blink |
OLD | NEW |