Changeset 93564 in webkit
- Timestamp:
- Aug 22, 2011 5:14:13 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r93561 r93564 1 2011-08-22 Nat Duca <nduca@chromium.org> 2 3 Make GraphicsContext3D::isResourceSafe a function and, on Chromium, determine its value lazily 4 https://bugs.webkit.org/show_bug.cgi?id=66708 5 6 Reviewed by Kenneth Russell. 7 8 * platform/graphics/GraphicsContext3D.cpp: 9 (WebCore::GraphicsContext3D::texImage2DResourceSafe): 10 * platform/graphics/GraphicsContext3D.h: 11 * platform/graphics/gtk/GraphicsContext3DGtk.cpp: 12 (WebCore::GraphicsContext3D::GraphicsContext3D): 13 * platform/graphics/mac/GraphicsContext3DMac.mm: 14 (WebCore::GraphicsContext3D::GraphicsContext3D): 15 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: 16 (WebCore::GraphicsContext3D::isResourceSafe): 17 * platform/graphics/qt/GraphicsContext3DQt.cpp: 18 (WebCore::GraphicsContext3D::GraphicsContext3D): 19 1 20 2011-08-22 Adam Barth <abarth@webkit.org> 2 21 -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp
r86275 r93564 67 67 ASSERT(unpackAlignment == 1 || unpackAlignment == 2 || unpackAlignment == 4 || unpackAlignment == 8); 68 68 OwnArrayPtr<unsigned char> zero; 69 if (! m_isResourceSafe&& width > 0 && height > 0) {69 if (!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
r92908 r93564 906 906 907 907 int m_currentWidth, m_currentHeight; 908 bool m_isResourceSafe;908 bool isResourceSafe(); 909 909 910 910 #if PLATFORM(MAC) -
trunk/Source/WebCore/platform/graphics/gtk/GraphicsContext3DGtk.cpp
r86557 r93564 56 56 : m_currentWidth(0) 57 57 , m_currentHeight(0) 58 , m_isResourceSafe(false)59 58 , m_attrs(attributes) 60 59 , m_texture(0) -
trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
r86275 r93564 91 91 : m_currentWidth(0) 92 92 , m_currentHeight(0) 93 , m_isResourceSafe(false)94 93 , m_contextObj(0) 95 94 , m_attrs(attrs) -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
r92908 r93564 121 121 if (mustRestoreFBO) 122 122 ::glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); 123 } 124 125 bool GraphicsContext3D::isResourceSafe() 126 { 127 return false; 123 128 } 124 129 -
trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
r92615 r93564 294 294 : m_currentWidth(0) 295 295 , m_currentHeight(0) 296 , m_isResourceSafe(false)297 296 , m_attrs(attrs) 298 297 , m_texture(0) -
trunk/Source/WebKit/chromium/ChangeLog
r93553 r93564 1 2011-08-22 Nat Duca <nduca@chromium.org> 2 3 Make GraphicsContext3D::isResourceSafe a function and, on Chromium, determine its value lazily 4 https://bugs.webkit.org/show_bug.cgi?id=66708 5 6 Reviewed by Kenneth Russell. 7 8 * src/GraphicsContext3DChromium.cpp: 9 (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): 10 (WebCore::GraphicsContext3DInternal::isResourceSafe): 11 (WebCore::GraphicsContext3D::create): 12 (WebCore::GraphicsContext3D::isResourceSafe): 13 * src/GraphicsContext3DInternal.h: 14 1 15 2011-08-22 Adam Klein <adamk@chromium.org> 2 16 -
trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
r93131 r93564 88 88 , m_initializedAvailableExtensions(false) 89 89 , m_layerComposited(false) 90 , m_resourceSafety(ResourceSafetyUnknown) 90 91 #if USE(SKIA) 91 92 , m_grContext(0) … … 759 760 } 760 761 762 bool GraphicsContext3DInternal::isResourceSafe() 763 { 764 if (m_resourceSafety == ResourceSafetyUnknown) 765 m_resourceSafety = getExtensions()->isEnabled("GL_CHROMIUM_resource_safe") ? ResourceSafe : ResourceUnsafe; 766 return m_resourceSafety == ResourceSafe; 767 } 768 761 769 namespace { 762 770 … … 973 981 RefPtr<GraphicsContext3D> result = adoptRef(new GraphicsContext3D(attrs, hostWindow, renderStyle == RenderDirectlyToHostWindow)); 974 982 result->m_internal = internal.release(); 975 result->m_isResourceSafe = result->getExtensions()->isEnabled("GL_CHROMIUM_resource_safe");976 983 return result.release(); 977 984 } … … 1002 1009 { 1003 1010 return m_internal->getInternalFramebufferSize(); 1011 } 1012 1013 bool GraphicsContext3D::isResourceSafe() 1014 { 1015 return m_internal->isResourceSafe(); 1004 1016 } 1005 1017 -
trunk/Source/WebKit/chromium/src/GraphicsContext3DInternal.h
r92908 r93564 76 76 void reshape(int width, int height); 77 77 IntSize getInternalFramebufferSize() const; 78 bool isResourceSafe(); 78 79 79 80 void markContextChanged(); … … 299 300 HashSet<String> m_requestableExtensions; 300 301 bool m_layerComposited; 302 303 enum ResourceSafety { 304 ResourceSafetyUnknown, 305 ResourceSafe, 306 ResourceUnsafe 307 }; 308 ResourceSafety m_resourceSafety; 309 301 310 #if USE(ACCELERATED_COMPOSITING) 302 311 RefPtr<WebGLLayerChromium> m_compositingLayer;
Note: See TracChangeset
for help on using the changeset viewer.