Changeset 146968 in webkit
- Timestamp:
- Mar 27, 2013 12:08:30 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r146967 r146968 1 2013-03-27 Kondapally Kalyan <kalyan.kondapally@intel.com> 2 3 [CoordGfx] Support to share GraphicsSurface flags with client. 4 https://bugs.webkit.org/show_bug.cgi?id=112982 5 6 Reviewed by Noam Rosenthal. 7 8 Covered by existing WebGL tests. 9 10 This patch adds support to pass GraphicsSurface flags during it's client creation. 11 This would be helpful to determine cases when blending can be disabled on client 12 side i.e When AlphaSupport is disabled during Graphics Surface creation. 13 With GLX, we rely on Window to provide us with necessary information on client side. 14 This might not be the case on other platforms or when not using Window on X. 15 This patch doesn't change original behaviour of creating GraphicsSurface client 16 with default flags GraphicsSurface::SupportsTextureTarget and GraphicsSurface::SupportsSharing. 17 18 * platform/graphics/texmap/TextureMapperPlatformLayer.h: 19 (WebCore::TextureMapperPlatformLayer::graphicsSurfaceFlags): 20 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: 21 (WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded): 22 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp: 23 (WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded): 24 * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h: 25 (CoordinatedGraphicsLayerState): 26 * platform/graphics/efl/GraphicsContext3DPrivate.cpp: 27 (WebCore): 28 (WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags): 29 * platform/graphics/efl/GraphicsContext3DPrivate.h: 30 (GraphicsContext3DPrivate): 31 * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp: 32 (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate): 33 (WebCore::GraphicsSurfacePrivate::initializeClient): 34 1 35 2013-03-26 Takashi Sakamoto <tasak@google.com> 2 36 -
trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp
r146458 r146968 265 265 return m_size; 266 266 } 267 268 GraphicsSurface::Flags GraphicsContext3DPrivate::graphicsSurfaceFlags() const 269 { 270 if (m_graphicsSurface) 271 return m_graphicsSurface->flags(); 272 273 return TextureMapperPlatformLayer::graphicsSurfaceFlags(); 274 } 267 275 #endif 268 276 -
trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.h
r146458 r146968 55 55 virtual uint32_t copyToGraphicsSurface() OVERRIDE; 56 56 virtual GraphicsSurfaceToken graphicsSurfaceToken() const OVERRIDE; 57 virtual GraphicsSurface::Flags graphicsSurfaceFlags() const OVERRIDE; 57 58 void didResizeCanvas(const IntSize&); 58 59 #endif -
trunk/Source/WebCore/platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp
r146458 r146968 42 42 } 43 43 44 GraphicsSurfacePrivate(PlatformBufferHandle winId, const IntSize& size, GraphicsSurface::Flags) 45 : m_rect(FloatPoint::zero(), size) 44 GraphicsSurfacePrivate(PlatformBufferHandle winId, const IntSize& size, GraphicsSurface::Flags flags) 45 : m_flags(0) 46 , m_rect(FloatPoint::zero(), size) 46 47 , m_size(size) 47 48 , m_sharedHandle(winId) 48 49 { 50 if (flags & GraphicsSurface::SupportsAlpha) 51 m_flags |= TextureMapperGL::ShouldBlend; 49 52 } 50 53 … … 142 145 if (!m_client) 143 146 return; 144 145 // FIXME: This information should be passed from GraphicsSurface.146 if (m_client->hasAlpha())147 m_flags |= TextureMapperGL::ShouldBlend;148 147 } 149 148 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h
r144190 r146968 43 43 virtual uint32_t copyToGraphicsSurface() { return 0; } 44 44 virtual GraphicsSurfaceToken graphicsSurfaceToken() const { return GraphicsSurfaceToken(); } 45 virtual GraphicsSurface::Flags graphicsSurfaceFlags() const { return GraphicsSurface::SupportsTextureTarget | GraphicsSurface::SupportsSharing; } 45 46 #endif 46 47 }; -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
r145806 r146968 728 728 m_layerState.canvasSize = m_canvasPlatformLayer->platformLayerSize(); 729 729 m_layerState.canvasToken = m_canvasPlatformLayer->graphicsSurfaceToken(); 730 m_layerState.canvasSurfaceFlags = m_canvasPlatformLayer->graphicsSurfaceFlags(); 730 731 m_layerState.canvasChanged = true; 731 732 m_isValidCanvas = true; -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp
r146747 r146968 204 204 RefPtr<TextureMapperSurfaceBackingStore> canvasBackingStore(TextureMapperSurfaceBackingStore::create()); 205 205 m_surfaceBackingStores.set(layer, canvasBackingStore); 206 207 GraphicsSurface::Flags surfaceFlags = GraphicsSurface::SupportsTextureTarget | GraphicsSurface::SupportsSharing; 208 canvasBackingStore->setGraphicsSurface(GraphicsSurface::create(state.canvasSize, surfaceFlags, state.canvasToken)); 206 canvasBackingStore->setGraphicsSurface(GraphicsSurface::create(state.canvasSize, state.canvasSurfaceFlags, state.canvasToken)); 209 207 layer->setContentsToMedia(canvasBackingStore.get()); 210 208 } -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h
r145806 r146968 44 44 45 45 #if USE(GRAPHICS_SURFACE) 46 #include "GraphicsSurface.h" 46 47 #include "GraphicsSurfaceToken.h" 47 48 #endif … … 163 164 GraphicsSurfaceToken canvasToken; 164 165 uint32_t canvasFrontBuffer; 166 GraphicsSurface::Flags canvasSurfaceFlags; 165 167 #endif 166 168 -
trunk/Source/WebKit2/ChangeLog
r146961 r146968 1 2013-03-27 Kondapally Kalyan <kalyan.kondapally@intel.com> 2 3 [CoordGfx] Support to share GraphicsSurface flags with client. 4 https://bugs.webkit.org/show_bug.cgi?id=112982 5 6 Reviewed by Noam Rosenthal. 7 8 Covered by existing WebGL tests. 9 10 This patch adds support to pass GraphicsSurface flags 11 during it's client creation. 12 13 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: 14 (CoreIPC::::encode): 15 (CoreIPC::::decode): 16 1 17 2013-03-26 Hayato Ito <hayato@chromium.org> 2 18 -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp
r144914 r146968 895 895 encoder << state.canvasToken; 896 896 encoder << state.canvasFrontBuffer; 897 encoder << state.canvasSurfaceFlags; 897 898 } 898 899 #endif … … 981 982 982 983 if (!decoder.decode(state.canvasFrontBuffer)) 984 return false; 985 986 if (!decoder.decode(state.canvasSurfaceFlags)) 983 987 return false; 984 988 }
Note: See TracChangeset
for help on using the changeset viewer.