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

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

Issue 14840015: Lose/restore WebGL contexts if multisampling blackist status changes at runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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
« Source/core/page/Settings.in ('K') | « Source/core/page/Settings.in ('k') | no next file » | 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 private: 77 private:
78 GraphicsContext3D* m_context; 78 GraphicsContext3D* m_context;
79 GC3Denum m_oldActiveTextureUnit; 79 GC3Denum m_oldActiveTextureUnit;
80 Platform3DObject m_oldTextureUnitZeroId; 80 Platform3DObject m_oldTextureUnitZeroId;
81 }; 81 };
82 82
83 PassRefPtr<DrawingBuffer> DrawingBuffer::create(GraphicsContext3D* context, cons t IntSize& size, PreserveDrawingBuffer preserve, PassRefPtr<ContextEvictionManag er> contextEvictionManager) 83 PassRefPtr<DrawingBuffer> DrawingBuffer::create(GraphicsContext3D* context, cons t IntSize& size, PreserveDrawingBuffer preserve, PassRefPtr<ContextEvictionManag er> contextEvictionManager)
84 { 84 {
85 Extensions3D* extensions = context->getExtensions(); 85 Extensions3D* extensions = context->getExtensions();
86 bool multisampleSupported = extensions->maySupportMultisampling() 86 bool multisampleSupported = extensions->supports("GL_ANGLE_framebuffer_blit" )
87 && extensions->supports("GL_ANGLE_framebuffer_blit")
88 && extensions->supports("GL_ANGLE_framebuffer_multisample") 87 && extensions->supports("GL_ANGLE_framebuffer_multisample")
89 && extensions->supports("GL_OES_rgb8_rgba8"); 88 && extensions->supports("GL_OES_rgb8_rgba8");
90 if (multisampleSupported) { 89 if (multisampleSupported) {
91 extensions->ensureEnabled("GL_ANGLE_framebuffer_blit"); 90 extensions->ensureEnabled("GL_ANGLE_framebuffer_blit");
92 extensions->ensureEnabled("GL_ANGLE_framebuffer_multisample"); 91 extensions->ensureEnabled("GL_ANGLE_framebuffer_multisample");
93 extensions->ensureEnabled("GL_OES_rgb8_rgba8"); 92 extensions->ensureEnabled("GL_OES_rgb8_rgba8");
94 } 93 }
95 bool packedDepthStencilSupported = extensions->supports("GL_OES_packed_depth _stencil"); 94 bool packedDepthStencilSupported = extensions->supports("GL_OES_packed_depth _stencil");
96 if (packedDepthStencilSupported) 95 if (packedDepthStencilSupported)
97 extensions->ensureEnabled("GL_OES_packed_depth_stencil"); 96 extensions->ensureEnabled("GL_OES_packed_depth_stencil");
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 817
819 void DrawingBuffer::bind() 818 void DrawingBuffer::bind()
820 { 819 {
821 if (!m_context) 820 if (!m_context)
822 return; 821 return;
823 822
824 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO ? m_multisampleFBO : m_fbo); 823 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO ? m_multisampleFBO : m_fbo);
825 } 824 }
826 825
827 } // namespace WebCore 826 } // namespace WebCore
OLDNEW
« Source/core/page/Settings.in ('K') | « Source/core/page/Settings.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698