Changeset 152269 in webkit
- Timestamp:
- Jul 1, 2013 4:21:17 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r152268 r152269 1 2013-07-01 Alex Christensen <achristensen@apple.com> 2 3 DrawingBuffer constructor and destructor were not defined for Windows. 4 I moved duplicate code from Cairo and Qt to DrawingBuffer.cpp to be used by Qt, Cairo, and Windows. 5 https://bugs.webkit.org/show_bug.cgi?id=118262 6 7 Reviewed by Dean Jackson. 8 9 * platform/graphics/cairo/DrawingBufferCairo.cpp: Removed duplicate DrawingBuffer constructor and destructor. 10 * platform/graphics/gpu/DrawingBuffer.cpp: 11 (WebCore::DrawingBuffer::DrawingBuffer): 12 (WebCore::DrawingBuffer::~DrawingBuffer): Moved from Cairo and Qt implementation. 13 * platform/graphics/gpu/qt/DrawingBufferQt.cpp: Removed duplicate DrawingBuffer constructor and destructor. 14 1 15 2013-07-01 Alex Christensen <achristensen@apple.com> 2 16 -
trunk/Source/WebCore/platform/graphics/cairo/DrawingBufferCairo.cpp
r152240 r152269 34 34 namespace WebCore { 35 35 36 DrawingBuffer::DrawingBuffer(GraphicsContext3D* context,37 const IntSize& size,38 bool multisampleExtensionSupported,39 bool packedDepthStencilExtensionSupported,40 PreserveDrawingBuffer preserveDrawingBuffer,41 AlphaRequirement alpha)42 : m_preserveDrawingBuffer(preserveDrawingBuffer)43 , m_alpha(alpha)44 , m_scissorEnabled(false)45 , m_texture2DBinding(0)46 , m_framebufferBinding(0)47 , m_activeTextureUnit(GraphicsContext3D::TEXTURE0)48 , m_context(context)49 , m_size(-1, -1)50 , m_multisampleExtensionSupported(multisampleExtensionSupported)51 , m_packedDepthStencilExtensionSupported(packedDepthStencilExtensionSupported)52 , m_fbo(context->createFramebuffer())53 , m_colorBuffer(0)54 , m_frontColorBuffer(0)55 , m_separateFrontTexture(false)56 , m_depthStencilBuffer(0)57 , m_depthBuffer(0)58 , m_stencilBuffer(0)59 , m_multisampleFBO(0)60 , m_multisampleColorBuffer(0)61 {62 ASSERT(m_fbo);63 if (!m_fbo) {64 clear();65 return;66 }67 68 // create a texture to render into69 m_colorBuffer = context->createTexture();70 context->bindTexture(GraphicsContext3D::TEXTURE_2D, m_colorBuffer);71 context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::LINEAR);72 context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR);73 context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_S, GraphicsContext3D::CLAMP_TO_EDGE);74 context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_T, GraphicsContext3D::CLAMP_TO_EDGE);75 context->bindTexture(GraphicsContext3D::TEXTURE_2D, 0);76 77 createSecondaryBuffers();78 reset(size);79 }80 81 DrawingBuffer::~DrawingBuffer()82 {83 clear();84 }85 86 36 #if USE(ACCELERATED_COMPOSITING) 87 37 -
trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp
r152240 r152269 40 40 41 41 namespace WebCore { 42 43 #if PLATFORM(WIN) || PLATFORM(QT) || USE(CAIRO) 44 DrawingBuffer::DrawingBuffer(GraphicsContext3D* context, const IntSize& size, bool multisampleExtensionSupported, bool packedDepthStencilExtensionSupported, PreserveDrawingBuffer preserveDrawingBuffer, AlphaRequirement alpha) 45 : m_preserveDrawingBuffer(preserveDrawingBuffer) 46 , m_alpha(alpha) 47 , m_scissorEnabled(false) 48 , m_texture2DBinding(0) 49 , m_framebufferBinding(0) 50 , m_activeTextureUnit(GraphicsContext3D::TEXTURE0) 51 , m_context(context) 52 , m_size(-1, -1) 53 , m_multisampleExtensionSupported(multisampleExtensionSupported) 54 , m_packedDepthStencilExtensionSupported(packedDepthStencilExtensionSupported) 55 , m_fbo(context->createFramebuffer()) 56 , m_colorBuffer(0) 57 , m_frontColorBuffer(0) 58 , m_separateFrontTexture(false) 59 , m_depthStencilBuffer(0) 60 , m_depthBuffer(0) 61 , m_stencilBuffer(0) 62 , m_multisampleFBO(0) 63 , m_multisampleColorBuffer(0) 64 { 65 ASSERT(m_fbo); 66 if (!m_fbo) { 67 clear(); 68 return; 69 } 70 71 // create a texture to render into 72 m_colorBuffer = context->createTexture(); 73 context->bindTexture(GraphicsContext3D::TEXTURE_2D, m_colorBuffer); 74 context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::LINEAR); 75 context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR); 76 context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_S, GraphicsContext3D::CLAMP_TO_EDGE); 77 context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_T, GraphicsContext3D::CLAMP_TO_EDGE); 78 context->bindTexture(GraphicsContext3D::TEXTURE_2D, 0); 79 80 createSecondaryBuffers(); 81 reset(size); 82 } 83 84 DrawingBuffer::~DrawingBuffer() 85 { 86 clear(); 87 } 88 #endif 42 89 43 90 // Global resource ceiling (expressed in terms of pixels) for DrawingBuffer creation and resize. -
trunk/Source/WebCore/platform/graphics/gpu/qt/DrawingBufferQt.cpp
r152240 r152269 32 32 namespace WebCore { 33 33 34 DrawingBuffer::DrawingBuffer(GraphicsContext3D* context,35 const IntSize& size,36 bool multisampleExtensionSupported,37 bool packedDepthStencilExtensionSupported,38 PreserveDrawingBuffer preserveDrawingBuffer,39 AlphaRequirement alpha)40 : m_preserveDrawingBuffer(preserveDrawingBuffer)41 , m_alpha(alpha)42 , m_scissorEnabled(false)43 , m_texture2DBinding(0)44 , m_framebufferBinding(0)45 , m_activeTextureUnit(GraphicsContext3D::TEXTURE0)46 , m_context(context)47 , m_size(-1, -1)48 , m_multisampleExtensionSupported(multisampleExtensionSupported)49 , m_packedDepthStencilExtensionSupported(packedDepthStencilExtensionSupported)50 , m_fbo(context->createFramebuffer())51 , m_colorBuffer(0)52 , m_frontColorBuffer(0)53 , m_separateFrontTexture(false)54 , m_depthStencilBuffer(0)55 , m_depthBuffer(0)56 , m_stencilBuffer(0)57 , m_multisampleFBO(0)58 , m_multisampleColorBuffer(0)59 {60 ASSERT(m_fbo);61 if (!m_fbo) {62 clear();63 return;64 }65 66 // create a texture to render into67 m_colorBuffer = context->createTexture();68 context->bindTexture(GraphicsContext3D::TEXTURE_2D, m_colorBuffer);69 context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::LINEAR);70 context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR);71 context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_S, GraphicsContext3D::CLAMP_TO_EDGE);72 context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_T, GraphicsContext3D::CLAMP_TO_EDGE);73 context->bindTexture(GraphicsContext3D::TEXTURE_2D, 0);74 75 createSecondaryBuffers();76 reset(size);77 }78 79 DrawingBuffer::~DrawingBuffer()80 {81 clear();82 }83 84 34 #if USE(ACCELERATED_COMPOSITING) 85 35 PlatformLayer* DrawingBuffer::platformLayer()
Note: See TracChangeset
for help on using the changeset viewer.