Changeset 86275 in webkit
- Timestamp:
- May 11, 2011 2:58:50 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86274 r86275 1 2011-05-11 John Bauman <jbauman@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 Don't send zeros in TexImage if GL implementation handles that 6 https://bugs.webkit.org/show_bug.cgi?id=60581 7 8 Chromium already handles zeroing textures upon creation, so don't 9 bother zeroing them in WebKit, as that causes some unnecessary memcpys 10 of zeros. 11 12 No new tests as functionality is the same. 13 14 * html/canvas/WebGLRenderingContext.cpp: 15 (WebCore::WebGLRenderingContext::texImage2DBase): 16 * platform/graphics/GraphicsContext3D.cpp: 17 (WebCore::GraphicsContext3D::texImage2DResourceSafe): 18 * platform/graphics/GraphicsContext3D.h: 19 * platform/graphics/gtk/GraphicsContext3DGtk.cpp: 20 (WebCore::GraphicsContext3D::GraphicsContext3D): 21 * platform/graphics/mac/GraphicsContext3DMac.mm: 22 (WebCore::GraphicsContext3D::GraphicsContext3D): 23 * platform/graphics/qt/GraphicsContext3DQt.cpp: 24 (WebCore::GraphicsContext3D::GraphicsContext3D): 25 1 26 2011-05-11 Simon Fraser <simon.fraser@apple.com> 2 27 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
r85603 r86275 3070 3070 } 3071 3071 } 3072 if (!pixels && !isResourceSafe()) {3072 if (!pixels) { 3073 3073 bool succeed = m_context->texImage2DResourceSafe(target, level, internalformat, width, height, 3074 3074 border, format, type, m_unpackAlignment); -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp
r84474 r86275 67 67 ASSERT(unpackAlignment == 1 || unpackAlignment == 2 || unpackAlignment == 4 || unpackAlignment == 8); 68 68 OwnArrayPtr<unsigned char> zero; 69 if ( width > 0 && height > 0) {69 if (!m_isResourceSafe && width > 0 && height > 0) { 70 70 unsigned int size; 71 71 GC3Denum error = computeImageSizeInBytes(format, type, width, height, unpackAlignment, &size, 0); -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h
r84101 r86275 887 887 888 888 int m_currentWidth, m_currentHeight; 889 bool m_isResourceSafe; 889 890 890 891 #if PLATFORM(MAC) -
trunk/Source/WebCore/platform/graphics/gtk/GraphicsContext3DGtk.cpp
r82878 r86275 56 56 : m_currentWidth(0) 57 57 , m_currentHeight(0) 58 , m_isResourceSafe(false) 58 59 , m_attrs(attributes) 59 60 , m_texture(0) -
trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
r82878 r86275 91 91 : m_currentWidth(0) 92 92 , m_currentHeight(0) 93 , m_isResourceSafe(false) 93 94 , m_contextObj(0) 94 95 , m_attrs(attrs) -
trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
r86026 r86275 616 616 617 617 GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, bool) 618 : m_internal(adoptPtr(new GraphicsContext3DInternal(attrs, hostWindow))) 618 : m_internal(adoptPtr(new GraphicsContext3DInternal(attrs, hostWindow))), m_isResourceSafe(false) 619 619 { 620 620 if (!m_internal->isValid()) -
trunk/Source/WebKit/chromium/ChangeLog
r86219 r86275 1 2011-05-11 John Bauman <jbauman@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 Don't send zeros in TexImage if GL implementation handles that 6 https://bugs.webkit.org/show_bug.cgi?id=60581 7 8 Chromium already handles zeroing textures upon creation, so don't 9 bother zeroing them in WebKit, as that causes some unnecessary memcpys 10 of zeros. 11 12 * src/GraphicsContext3DChromium.cpp: 13 (WebCore::GraphicsContext3D::create): 14 1 15 2011-05-10 Kent Tamura <tkent@chromium.org> 2 16 -
trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
r85823 r86275 946 946 RefPtr<GraphicsContext3D> result = adoptRef(new GraphicsContext3D(attrs, hostWindow, renderStyle == RenderDirectlyToHostWindow)); 947 947 result->m_internal = internal.release(); 948 result->m_isResourceSafe = result->getExtensions()->isEnabled("GL_CHROMIUM_resource_safe"); 948 949 return result.release(); 949 950 }
Note: See TracChangeset
for help on using the changeset viewer.