Changeset 86975 in webkit
- Timestamp:
- May 20, 2011 12:28:10 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86973 r86975 1 2011-05-20 Alok Priyadarshi <alokp@chromium.org> 2 3 Reviewed by James Robinson. 4 5 [chromium] Remove LayerRendererChromium::useShader 6 https://bugs.webkit.org/show_bug.cgi?id=61143 7 8 GPU compositor tests should be sufficient. 9 10 * platform/graphics/chromium/LayerRendererChromium.cpp: 11 (WebCore::LayerRendererChromium::LayerRendererChromium): 12 * platform/graphics/chromium/LayerRendererChromium.h: 13 * platform/graphics/chromium/LayerTilerChromium.cpp: 14 (WebCore::LayerTilerChromium::draw): 15 * platform/graphics/chromium/RenderSurfaceChromium.cpp: 16 (WebCore::RenderSurfaceChromium::drawSurface): 17 * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: 18 (WebCore::CCCanvasLayerImpl::draw): 19 * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: 20 (WebCore::CCHeadsUpDisplay::draw): 21 * platform/graphics/chromium/cc/CCLayerImpl.cpp: 22 (WebCore::CCLayerImpl::drawDebugBorder): 23 * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: 24 (WebCore::CCPluginLayerImpl::draw): 25 * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: 26 (WebCore::CCVideoLayerImpl::drawYUV): 27 (WebCore::CCVideoLayerImpl::drawRGBA): 28 1 29 2011-05-20 Dirk Schulze <krit@webkit.org> 2 30 -
trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
r86805 r86975 113 113 : m_viewportScrollPosition(IntPoint(-1, -1)) 114 114 , m_rootLayer(0) 115 , m_currentShader(0)116 115 , m_currentRenderSurface(0) 117 116 , m_offscreenFramebufferId(0) … … 152 151 if (error != GraphicsContext3D::NO_ERROR) 153 152 LOG_ERROR("GL command failed: File: %s\n\tLine %d\n\tcommand: %s, error %x\n", file, line, command, static_cast<int>(error)); 154 }155 156 void LayerRendererChromium::useShader(unsigned programId)157 {158 if (programId != m_currentShader) {159 GLC(m_context.get(), m_context->useProgram(programId));160 m_currentShader = programId;161 }162 153 } 163 154 -
trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
r86805 r86975 113 113 const TransformationMatrix& projectionMatrix() const { return m_projectionMatrix; } 114 114 115 void useShader(unsigned);116 117 115 bool checkTextureSize(const IntSize&); 118 116 … … 197 195 bool m_hardwareCompositing; 198 196 199 unsigned m_currentShader;200 197 RenderSurfaceChromium* m_currentRenderSurface; 201 198 -
trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp
r86805 r86975 338 338 GraphicsContext3D* context = layerRendererContext(); 339 339 const LayerTilerChromium::Program* program = layerRenderer()->tilerProgram(); 340 layerRenderer()->useShader(program->program());340 GLC(context, context->useProgram(program->program())); 341 341 GLC(context, context->uniform1i(program->fragmentShader().samplerLocation(), 0)); 342 342 -
trunk/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.cpp
r86652 r86975 112 112 if (!maskLayer->bounds().isEmpty()) { 113 113 context3D->makeContextCurrent(); 114 layerRenderer()->useShader(maskProgram->program());114 GLC(context3D, context3D->useProgram(maskProgram->program())); 115 115 GLC(context3D, context3D->activeTexture(GraphicsContext3D::TEXTURE0)); 116 116 GLC(context3D, context3D->uniform1i(maskProgram->fragmentShader().samplerLocation(), 0)); … … 127 127 128 128 if (!useMask) { 129 layerRenderer()->useShader(program->program());129 GLC(context3D, context3D->useProgram(program->program())); 130 130 m_contentsTexture->bindTexture(); 131 131 GLC(context3D, context3D->uniform1i(program->fragmentShader().samplerLocation(), 0)); -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp
r86905 r86975 65 65 GLC(context, context->blendFunc(sfactor, GraphicsContext3D::ONE_MINUS_SRC_ALPHA)); 66 66 } 67 layerRenderer()->useShader(program->program());67 GLC(context, context->useProgram(program->program())); 68 68 GLC(context, context->uniform1i(program->fragmentShader().samplerLocation(), 0)); 69 69 LayerChromium::drawTexturedQuad(context, layerRenderer()->projectionMatrix(), drawTransform(), -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp
r86805 r86975 125 125 GLC(context, context->activeTexture(GraphicsContext3D::TEXTURE0)); 126 126 m_hudTexture->bindTexture(); 127 m_layerRenderer->useShader(program->program());127 GLC(context, context->useProgram(program->program())); 128 128 GLC(context, context->uniform1i(program->fragmentShader().samplerLocation(), 0)); 129 129 -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp
r86652 r86975 182 182 183 183 ASSERT(layerRenderer()); 184 GraphicsContext3D* context = layerRenderer()->context(); 184 185 const LayerChromium::BorderProgram* program = layerRenderer()->borderProgram(); 185 186 ASSERT(program && program->initialized()); 186 layerRenderer()->useShader(program->program()); 187 GLC(context, context->useProgram(program->program())); 188 187 189 TransformationMatrix renderMatrix = drawTransform(); 188 190 renderMatrix.scale3d(bounds().width(), bounds().height(), 1); 189 191 toGLMatrix(&glMatrix[0], layerRenderer()->projectionMatrix() * renderMatrix); 190 GraphicsContext3D* context = layerRenderer()->context();191 192 GLC(context, context->uniformMatrix4fv(program->vertexShader().matrixLocation(), false, &glMatrix[0], 1)); 192 193 -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCPluginLayerImpl.cpp
r86652 r86975 63 63 GLC(context, context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_T, GraphicsContext3D::CLAMP_TO_EDGE)); 64 64 65 layerRenderer()->useShader(program->program());65 GLC(context, context->useProgram(program->program())); 66 66 GLC(context, context->uniform1i(program->fragmentShader().samplerLocation(), 0)); 67 67 LayerChromium::drawTexturedQuad(context, layerRenderer()->projectionMatrix(), drawTransform(), -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp
r86652 r86975 116 116 GLC(context, context->bindTexture(GraphicsContext3D::TEXTURE_2D, vTexture.id)); 117 117 118 layerRenderer()->useShader(program->program());118 GLC(context, context->useProgram(program->program())); 119 119 120 120 float yWidthScaleFactor = static_cast<float>(yTexture.visibleSize.width()) / yTexture.size.width(); … … 148 148 GLC(context, context->bindTexture(GraphicsContext3D::TEXTURE_2D, texture.id)); 149 149 150 layerRenderer()->useShader(program->program());150 GLC(context, context->useProgram(program->program())); 151 151 float widthScaleFactor = static_cast<float>(texture.visibleSize.width()) / texture.size.width(); 152 152 GLC(context, context->uniform4f(program->vertexShader().texTransformLocation(), 0, 0, widthScaleFactor, 1));
Note: See TracChangeset
for help on using the changeset viewer.