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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 resizeDepthStencil(0); | 279 resizeDepthStencil(0); |
280 if (m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) !=
GraphicsContext3D::FRAMEBUFFER_COMPLETE) { | 280 if (m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) !=
GraphicsContext3D::FRAMEBUFFER_COMPLETE) { |
281 // Cleanup | 281 // Cleanup |
282 clear(); | 282 clear(); |
283 return false; | 283 return false; |
284 } | 284 } |
285 } | 285 } |
286 | 286 |
287 clearFramebuffer(); | 287 clearFramebuffer(); |
288 | 288 |
289 didReset(); | |
290 | |
291 return true; | 289 return true; |
292 } | 290 } |
293 | 291 |
294 void DrawingBuffer::commit(long x, long y, long width, long height) | 292 void DrawingBuffer::commit(long x, long y, long width, long height) |
295 { | 293 { |
296 if (!m_context) | 294 if (!m_context) |
297 return; | 295 return; |
298 | 296 |
299 if (width < 0) | 297 if (width < 0) |
300 width = m_size.width(); | 298 width = m_size.width(); |
(...skipping 16 matching lines...) Expand all Loading... |
317 if (!m_context) | 315 if (!m_context) |
318 return; | 316 return; |
319 | 317 |
320 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO
? m_multisampleFBO : m_fbo); | 318 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO
? m_multisampleFBO : m_fbo); |
321 m_context->viewport(0, 0, m_size.width(), m_size.height()); | 319 m_context->viewport(0, 0, m_size.width(), m_size.height()); |
322 } | 320 } |
323 | 321 |
324 } // namespace WebCore | 322 } // namespace WebCore |
325 | 323 |
326 #endif | 324 #endif |
OLD | NEW |