Changeset 78495 in webkit
- Timestamp:
- Feb 14, 2011 11:48:14 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r78493 r78495 1 2011-02-14 Andrew Wason <rectalogic@rectalogic.com> 2 3 Reviewed by Kenneth Russell. 4 5 [Qt] WebKit fails to compile for Qt when WebGL enabled 6 https://bugs.webkit.org/show_bug.cgi?id=53431 7 8 No new tests. 9 10 * WebCore.pro: 11 Add source and header files and include directory to Qt project. 12 * html/canvas/WebGLRenderingContext.cpp: 13 File uses 'emit' which is a Qt keyword - #undef emit. 14 * platform/graphics/gpu/qt: Added. 15 * platform/graphics/gpu/qt/DrawingBufferQt.cpp: Added. 16 Partial implementation of DrawingBuffer for Qt. 17 (WebCore::DrawingBuffer::DrawingBuffer): 18 (WebCore::DrawingBuffer::~DrawingBuffer): 19 (WebCore::DrawingBuffer::didReset): 20 (WebCore::DrawingBuffer::platformLayer): 21 (WebCore::DrawingBuffer::platformColorBuffer): 22 * platform/graphics/qt/Extensions3DQt.cpp: 23 Noop implementation for pure virtual methods added to Extensions3D.h 24 (WebCore::Extensions3DQt::blitFramebuffer): 25 (WebCore::Extensions3DQt::renderbufferStorageMultisample): 26 * platform/graphics/qt/Extensions3DQt.h: 27 Declare new methods added to Extensions3D.h 28 * platform/graphics/qt/GraphicsContext3DQt.cpp: 29 Remove method implementations no longer in GraphicsContext3D.h. 30 Change m_syntheticErrors to use unsigned int to match new 31 GC3Denum type. 32 (WebCore::GraphicsContext3D::create): 33 Change return type to match GraphicsContext3D.h 34 (WebCore::GraphicsContext3D::lineWidth): 35 Change argument type to GC3Dfloat to match GraphicsContext3D.h 36 (WebCore::GraphicsContext3D::getUniformLocation): 37 Change return type to GC3Dfloat to match GraphicsContext3D.h 38 (WebCore::GraphicsContext3D::getExtensions): 39 Need to call get() on OwnPtr. 40 (WebCore::GraphicsContext3D::getImageData): 41 Rename enum values to match declarations in GraphicsContext3D.h 42 1 43 2011-02-14 Tony Chang <tony@chromium.org> 2 44 -
trunk/Source/WebCore/WebCore.pro
r78439 r78495 3811 3811 html/canvas/WebGLBuffer.h \ 3812 3812 html/canvas/WebGLContextAttributes.h \ 3813 html/canvas/WebGLContextEvent.h \ 3813 3814 html/canvas/WebGLExtension.h \ 3814 3815 html/canvas/WebGLFramebuffer.h \ … … 3825 3826 platform/graphics/Extensions3D.h \ 3826 3827 platform/graphics/GraphicsContext3D.h \ 3828 platform/graphics/gpu/DrawingBuffer.h \ 3827 3829 platform/graphics/qt/Extensions3DQt.h 3828 3830 … … 3836 3838 html/canvas/WebGLBuffer.cpp \ 3837 3839 html/canvas/WebGLContextAttributes.cpp \ 3840 html/canvas/WebGLContextEvent.cpp \ 3838 3841 html/canvas/WebGLExtension.cpp \ 3839 3842 html/canvas/WebGLFramebuffer.cpp \ … … 3849 3852 html/canvas/WebKitLoseContext.cpp \ 3850 3853 platform/graphics/GraphicsContext3D.cpp \ 3854 platform/graphics/gpu/DrawingBuffer.cpp \ 3855 platform/graphics/gpu/qt/DrawingBufferQt.cpp \ 3851 3856 platform/graphics/qt/Extensions3DQt.cpp \ 3852 3857 platform/graphics/qt/GraphicsContext3DQt.cpp 3858 3859 INCLUDEPATH += $$PWD/platform/graphics/gpu 3853 3860 } 3854 3861 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
r78419 r78495 66 66 #include <wtf/PassOwnArrayPtr.h> 67 67 #include <wtf/text/StringBuilder.h> 68 69 #if PLATFORM(QT) 70 #undef emit 71 #endif 68 72 69 73 namespace WebCore { -
trunk/Source/WebCore/platform/graphics/qt/Extensions3DQt.cpp
r76600 r78495 57 57 } 58 58 59 void Extensions3DQt::blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter) 60 { 61 } 62 63 void Extensions3DQt::renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) 64 { 65 } 66 59 67 } // namespace WebCore 60 68 -
trunk/Source/WebCore/platform/graphics/qt/Extensions3DQt.h
r73806 r78495 39 39 virtual void ensureEnabled(const String&); 40 40 virtual int getGraphicsResetStatusARB(); 41 virtual void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter); 42 virtual void renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height); 41 43 42 44 private: -
trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
r77900 r78495 253 253 GLuint m_depthBuffer; 254 254 QImage m_pixels; 255 ListHashSet<unsigned long> m_syntheticErrors;255 ListHashSet<unsigned int> m_syntheticErrors; 256 256 257 257 OwnPtr<Extensions3DQt> m_extensions; … … 278 278 } 279 279 280 // Even with underlying GLES2 driver, the below flags should still be set to281 // false if extentions exist (and they almost always do).282 bool GraphicsContext3D::isGLES2NPOTStrict() const283 {284 return false;285 }286 287 bool GraphicsContext3D::isErrorGeneratedOnOutOfBoundsAccesses() const288 {289 return false;290 }291 292 int GraphicsContext3D::getGraphicsResetStatusARB()293 {294 return NO_ERROR;295 }296 297 298 280 GraphicsContext3DInternal::GraphicsContext3DInternal(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow) 299 281 : m_attrs(attrs) … … 500 482 } 501 483 502 Pass OwnPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)484 PassRefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle) 503 485 { 504 486 // This implementation doesn't currently support rendering directly to the HostWindow. 505 487 if (renderStyle == RenderDirectlyToHostWindow) 506 488 return 0; 507 OwnPtr<GraphicsContext3D> context(new GraphicsContext3D(attrs, hostWindow, false));489 RefPtr<GraphicsContext3D> context = adoptRef(new GraphicsContext3D(attrs, hostWindow, false)); 508 490 return context->m_internal ? context.release() : 0; 509 491 } … … 1039 1021 } 1040 1022 1041 void GraphicsContext3D::lineWidth( doublewidth)1023 void GraphicsContext3D::lineWidth(GC3Dfloat width) 1042 1024 { 1043 1025 m_internal->m_glWidget->makeCurrent(); … … 1490 1472 } 1491 1473 1492 longGraphicsContext3D::getUniformLocation(Platform3DObject program, const String& name)1474 GC3Dint GraphicsContext3D::getUniformLocation(Platform3DObject program, const String& name) 1493 1475 { 1494 1476 ASSERT(program); … … 1621 1603 if (!m_internal->m_extensions) 1622 1604 m_internal->m_extensions = adoptPtr(new Extensions3DQt); 1623 return m_internal->m_extensions ;1605 return m_internal->m_extensions.get(); 1624 1606 } 1625 1607 … … 1638 1620 return false; 1639 1621 1640 AlphaOp neededAlphaOp = kAlphaDoNothing;1622 AlphaOp neededAlphaOp = AlphaDoNothing; 1641 1623 if (!premultiplyAlpha) 1642 1624 // FIXME: must fetch the image data before the premultiplication step 1643 neededAlphaOp = kAlphaDoUnmultiply;1625 neededAlphaOp = AlphaDoUnmultiply; 1644 1626 QImage nativeImage = nativePixmap->toImage().convertToFormat(QImage::Format_ARGB32); 1645 1627 outputVector.resize(nativeImage.byteCount()); 1646 return packPixels(nativeImage.rgbSwapped().bits(), kSourceFormatRGBA8, image->width(), image->height(), 0,1628 return packPixels(nativeImage.rgbSwapped().bits(), SourceFormatRGBA8, image->width(), image->height(), 0, 1647 1629 format, type, neededAlphaOp, outputVector.data()); 1648 1630 }
Note: See TracChangeset
for help on using the changeset viewer.