| 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 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 ASSERT(drawingBuffer()); | 1163 ASSERT(drawingBuffer()); |
| 1164 m_drawingBuffer->beginDestruction(); | 1164 m_drawingBuffer->beginDestruction(); |
| 1165 m_drawingBuffer.clear(); | 1165 m_drawingBuffer.clear(); |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 void WebGLRenderingContextBase::markContextChanged(ContentChangeType changeType) | 1168 void WebGLRenderingContextBase::markContextChanged(ContentChangeType changeType) |
| 1169 { | 1169 { |
| 1170 if (m_framebufferBinding || isContextLost()) | 1170 if (m_framebufferBinding || isContextLost()) |
| 1171 return; | 1171 return; |
| 1172 | 1172 |
| 1173 drawingBuffer()->markContentsChanged(); | 1173 if (m_markedCanvasDirty && !drawingBuffer()->markContentsChanged()) |
| 1174 return; |
| 1174 | 1175 |
| 1175 if (!canvas()) | 1176 if (!canvas()) |
| 1176 return; | 1177 return; |
| 1177 | 1178 |
| 1178 LayoutBox* layoutBox = canvas()->layoutBox(); | 1179 LayoutBox* layoutBox = canvas()->layoutBox(); |
| 1179 if (layoutBox && layoutBox->hasAcceleratedCompositing()) { | 1180 if (layoutBox && layoutBox->hasAcceleratedCompositing()) { |
| 1180 m_markedCanvasDirty = true; | 1181 m_markedCanvasDirty = true; |
| 1181 canvas()->clearCopiedImage(); | 1182 canvas()->clearCopiedImage(); |
| 1182 layoutBox->contentChanged(changeType); | 1183 layoutBox->contentChanged(changeType); |
| 1183 } else { | 1184 } else { |
| (...skipping 5240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6424 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); | 6425 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); |
| 6425 } | 6426 } |
| 6426 | 6427 |
| 6427 void WebGLRenderingContextBase::restoreUnpackParameters() | 6428 void WebGLRenderingContextBase::restoreUnpackParameters() |
| 6428 { | 6429 { |
| 6429 if (m_unpackAlignment != 1) | 6430 if (m_unpackAlignment != 1) |
| 6430 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); | 6431 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); |
| 6431 } | 6432 } |
| 6432 | 6433 |
| 6433 } // namespace blink | 6434 } // namespace blink |
| OLD | NEW |