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

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

Issue 105123003: Fixed bookkeeping bug in management of dimensions of mailbox's texture. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed unnecessary "using" statements. Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/web/tests/DrawingBufferTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 } 494 }
495 495
496 bool DrawingBuffer::resizeFramebuffer(const IntSize& size) 496 bool DrawingBuffer::resizeFramebuffer(const IntSize& size)
497 { 497 {
498 // resize regular FBO 498 // resize regular FBO
499 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_fbo); 499 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_fbo);
500 500
501 m_context->bindTexture(GraphicsContext3D::TEXTURE_2D, m_colorBuffer); 501 m_context->bindTexture(GraphicsContext3D::TEXTURE_2D, m_colorBuffer);
502 m_context->texImage2DResourceSafe(GraphicsContext3D::TEXTURE_2D, 0, m_intern alColorFormat, size.width(), size.height(), 0, m_colorFormat, GraphicsContext3D: :UNSIGNED_BYTE); 502 m_context->texImage2DResourceSafe(GraphicsContext3D::TEXTURE_2D, 0, m_intern alColorFormat, size.width(), size.height(), 0, m_colorFormat, GraphicsContext3D: :UNSIGNED_BYTE);
503 if (m_lastColorBuffer) 503 if (m_lastColorBuffer)
504 m_lastColorBuffer->size = m_size; 504 m_lastColorBuffer->size = size;
505 505
506 m_context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsCont ext3D::COLOR_ATTACHMENT0, GraphicsContext3D::TEXTURE_2D, m_colorBuffer, 0); 506 m_context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsCont ext3D::COLOR_ATTACHMENT0, GraphicsContext3D::TEXTURE_2D, m_colorBuffer, 0);
507 507
508 m_context->bindTexture(GraphicsContext3D::TEXTURE_2D, 0); 508 m_context->bindTexture(GraphicsContext3D::TEXTURE_2D, 0);
509 509
510 if (!multisample()) 510 if (!multisample())
511 resizeDepthStencil(size, 0); 511 resizeDepthStencil(size, 0);
512 if (m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != Gra phicsContext3D::FRAMEBUFFER_COMPLETE) 512 if (m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != Gra phicsContext3D::FRAMEBUFFER_COMPLETE)
513 return false; 513 return false;
514 514
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 752
753 void DrawingBuffer::bind() 753 void DrawingBuffer::bind()
754 { 754 {
755 if (!m_context) 755 if (!m_context)
756 return; 756 return;
757 757
758 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO ? m_multisampleFBO : m_fbo); 758 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO ? m_multisampleFBO : m_fbo);
759 } 759 }
760 760
761 } // namespace WebCore 761 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/web/tests/DrawingBufferTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698