| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 } | 149 } |
| 150 | 150 |
| 151 DrawingBuffer::~DrawingBuffer() | 151 DrawingBuffer::~DrawingBuffer() |
| 152 { | 152 { |
| 153 ASSERT(m_destructionInProgress); | 153 ASSERT(m_destructionInProgress); |
| 154 ASSERT(m_textureMailboxes.isEmpty()); | 154 ASSERT(m_textureMailboxes.isEmpty()); |
| 155 m_layer.reset(); | 155 m_layer.reset(); |
| 156 m_contextProvider.reset(); | 156 m_contextProvider.reset(); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void DrawingBuffer::markContentsChanged() | 159 bool DrawingBuffer::markContentsChanged() |
| 160 { | 160 { |
| 161 m_contentsChanged = true; | 161 if (m_contentsChangeCommitted || !m_contentsChanged) { |
| 162 m_contentsChangeCommitted = false; | 162 m_contentsChangeCommitted = false; |
| 163 m_contentsChanged = true; |
| 164 return true; |
| 165 } |
| 166 return false; |
| 163 } | 167 } |
| 164 | 168 |
| 165 bool DrawingBuffer::bufferClearNeeded() const | 169 bool DrawingBuffer::bufferClearNeeded() const |
| 166 { | 170 { |
| 167 return m_bufferClearNeeded; | 171 return m_bufferClearNeeded; |
| 168 } | 172 } |
| 169 | 173 |
| 170 void DrawingBuffer::setBufferClearNeeded(bool flag) | 174 void DrawingBuffer::setBufferClearNeeded(bool flag) |
| 171 { | 175 { |
| 172 if (m_preserveDrawingBuffer == Discard) { | 176 if (m_preserveDrawingBuffer == Discard) { |
| (...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 | 1070 |
| 1067 void DrawingBuffer::restoreTextureBindings() | 1071 void DrawingBuffer::restoreTextureBindings() |
| 1068 { | 1072 { |
| 1069 // This class potentially modifies the bindings for GL_TEXTURE_2D and | 1073 // This class potentially modifies the bindings for GL_TEXTURE_2D and |
| 1070 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since | 1074 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since |
| 1071 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. | 1075 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. |
| 1072 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); | 1076 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); |
| 1073 } | 1077 } |
| 1074 | 1078 |
| 1075 } // namespace blink | 1079 } // namespace blink |
| OLD | NEW |