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

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

Issue 7671031: Merge 92520 - [chromium] Accelerated canvas breaks when moving canvases or resources between Pages (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/gpu/DrawingBuffer.h ('k') | Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698