Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 2011783002: Rename OwnPtr::clear() to reset() in platform/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698