Changeset 145649 in webkit
- Timestamp:
- Mar 12, 2013 6:14:34 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r145645 r145649 1 2013-03-12 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r145280. 4 http://trac.webkit.org/changeset/145280 5 https://bugs.webkit.org/show_bug.cgi?id=112217 6 7 This patch broke chromium WebGL conformance tests (Requested 8 by shawnsingh on #webkit). 9 10 * platform/graphics/gpu/DrawingBuffer.cpp: 11 (WebCore::DrawingBuffer::reset): 12 * platform/graphics/gpu/DrawingBuffer.h: 13 (DrawingBuffer): 14 1 15 2013-03-12 Dean Jackson <dino@apple.com> 2 16 -
trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp
r145280 r145649 190 190 } 191 191 192 // Only way to ensure that we're not getting a bad framebuffer on some AMD/OSX devices.193 // FIXME: This can be removed once renderbufferStorageMultisample starts reporting GL_OUT_OF_MEMORY properly.194 bool DrawingBuffer::checkBufferIntegrity()195 {196 if (!m_multisampleFBO)197 return true;198 199 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO);200 m_context->clearColor(1.0f, 0.0f, 1.0f, 1.0f);201 m_context->clear(GraphicsContext3D::COLOR_BUFFER_BIT);202 203 commit(0, 0, 1, 1);204 205 unsigned char pixel[4] = {0, 0, 0, 0};206 m_context->readPixels(0, 0, 1, 1, GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, &pixel);207 208 return (pixel[0] == 0xFF && pixel[1] == 0x00 && pixel[2] == 0xFF && pixel[3] == 0xFF);209 }210 211 192 bool DrawingBuffer::reset(const IntSize& newSize) 212 193 { … … 258 239 } 259 240 241 260 242 do { 261 243 m_size = adjustedSize; … … 271 253 m_context->bindRenderbuffer(GraphicsContext3D::RENDERBUFFER, m_multisampleColorBuffer); 272 254 m_context->getExtensions()->renderbufferStorageMultisample(GraphicsContext3D::RENDERBUFFER, sampleCount, internalRenderbufferFormat, m_size.width(), m_size.height()); 273 274 if (m_context->getError() == GraphicsContext3D::OUT_OF_MEMORY) {275 adjustedSize.scale(s_resourceAdjustedRatio);276 continue;277 }278 279 255 m_context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::COLOR_ATTACHMENT0, GraphicsContext3D::RENDERBUFFER, m_multisampleColorBuffer); 280 256 resizeDepthStencil(sampleCount); … … 303 279 if (!multisample()) 304 280 resizeDepthStencil(0); 305 if (m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) { 306 adjustedSize.scale(s_resourceAdjustedRatio); 307 continue; 308 } 309 310 #if OS(DARWIN) 311 // FIXME: This can be removed once renderbufferStorageMultisample starts reporting GL_OUT_OF_MEMORY properly on OSX. 312 if (!checkBufferIntegrity()) { 313 adjustedSize.scale(s_resourceAdjustedRatio); 314 continue; 315 } 316 #endif 317 318 break; 281 if (m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) == GraphicsContext3D::FRAMEBUFFER_COMPLETE) 282 break; 283 adjustedSize.scale(s_resourceAdjustedRatio); 319 284 320 285 } while (!adjustedSize.isEmpty()); -
trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.h
r145280 r145649 141 141 void initialize(const IntSize&); 142 142 143 bool checkBufferIntegrity();144 145 143 PreserveDrawingBuffer m_preserveDrawingBuffer; 146 144 AlphaRequirement m_alpha;
Note: See TracChangeset
for help on using the changeset viewer.