| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 memset(m_colorMask, 0, 4 * sizeof(GLboolean)); | 145 memset(m_colorMask, 0, 4 * sizeof(GLboolean)); |
| 146 memset(m_clearColor, 0, 4 * sizeof(GLfloat)); | 146 memset(m_clearColor, 0, 4 * sizeof(GLfloat)); |
| 147 // Used by browser tests to detect the use of a DrawingBuffer. | 147 // Used by browser tests to detect the use of a DrawingBuffer. |
| 148 TRACE_EVENT_INSTANT0("test_gpu", "DrawingBufferCreation", TRACE_EVENT_SCOPE_
GLOBAL); | 148 TRACE_EVENT_INSTANT0("test_gpu", "DrawingBufferCreation", TRACE_EVENT_SCOPE_
GLOBAL); |
| 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.clear(); | 155 m_layer.reset(); |
| 156 m_contextProvider.clear(); | 156 m_contextProvider.reset(); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void DrawingBuffer::markContentsChanged() | 159 void DrawingBuffer::markContentsChanged() |
| 160 { | 160 { |
| 161 m_contentsChanged = true; | 161 m_contentsChanged = true; |
| 162 m_contentsChangeCommitted = false; | 162 m_contentsChangeCommitted = false; |
| 163 } | 163 } |
| 164 | 164 |
| 165 bool DrawingBuffer::bufferClearNeeded() const | 165 bool DrawingBuffer::bufferClearNeeded() const |
| 166 { | 166 { |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1056 | 1056 |
| 1057 void DrawingBuffer::restoreTextureBindings() | 1057 void DrawingBuffer::restoreTextureBindings() |
| 1058 { | 1058 { |
| 1059 // This class potentially modifies the bindings for GL_TEXTURE_2D and | 1059 // This class potentially modifies the bindings for GL_TEXTURE_2D and |
| 1060 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since | 1060 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since |
| 1061 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. | 1061 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. |
| 1062 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); | 1062 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); |
| 1063 } | 1063 } |
| 1064 | 1064 |
| 1065 } // namespace blink | 1065 } // namespace blink |
| OLD | NEW |