| 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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 ASSERT(drawingBuffer()); | 1053 ASSERT(drawingBuffer()); |
| 1054 m_drawingBuffer->beginDestruction(); | 1054 m_drawingBuffer->beginDestruction(); |
| 1055 m_drawingBuffer.clear(); | 1055 m_drawingBuffer.clear(); |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 void WebGLRenderingContextBase::markContextChanged(ContentChangeType changeType) | 1058 void WebGLRenderingContextBase::markContextChanged(ContentChangeType changeType) |
| 1059 { | 1059 { |
| 1060 if (m_framebufferBinding || isContextLost()) | 1060 if (m_framebufferBinding || isContextLost()) |
| 1061 return; | 1061 return; |
| 1062 | 1062 |
| 1063 drawingBuffer()->markContentsChanged(); | 1063 if (!drawingBuffer()->markContentsChanged()) |
| 1064 return; |
| 1064 | 1065 |
| 1065 LayoutBox* layoutBox = canvas()->layoutBox(); | 1066 LayoutBox* layoutBox = canvas()->layoutBox(); |
| 1066 if (layoutBox && layoutBox->hasAcceleratedCompositing()) { | 1067 if (layoutBox && layoutBox->hasAcceleratedCompositing()) { |
| 1067 m_markedCanvasDirty = true; | 1068 m_markedCanvasDirty = true; |
| 1068 canvas()->clearCopiedImage(); | 1069 canvas()->clearCopiedImage(); |
| 1069 layoutBox->contentChanged(changeType); | 1070 layoutBox->contentChanged(changeType); |
| 1070 } else { | 1071 } else { |
| 1071 if (!m_markedCanvasDirty) { | 1072 if (!m_markedCanvasDirty) { |
| 1072 m_markedCanvasDirty = true; | 1073 m_markedCanvasDirty = true; |
| 1073 canvas()->didDraw(FloatRect(FloatPoint(0, 0), FloatSize(clampedCanva
sSize()))); | 1074 canvas()->didDraw(FloatRect(FloatPoint(0, 0), FloatSize(clampedCanva
sSize()))); |
| (...skipping 5148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6222 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); | 6223 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); |
| 6223 } | 6224 } |
| 6224 | 6225 |
| 6225 void WebGLRenderingContextBase::restoreUnpackParameters() | 6226 void WebGLRenderingContextBase::restoreUnpackParameters() |
| 6226 { | 6227 { |
| 6227 if (m_unpackAlignment != 1) | 6228 if (m_unpackAlignment != 1) |
| 6228 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); | 6229 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); |
| 6229 } | 6230 } |
| 6230 | 6231 |
| 6231 } // namespace blink | 6232 } // namespace blink |
| OLD | NEW |