Changeset 194103 in webkit
- Timestamp:
- Dec 15, 2015 3:54:13 AM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r194100 r194103 1 2015-12-15 Zan Dobersek <zdobersek@igalia.com> 2 3 [TexMap] Operate with a reference to the TextureMapper wherever possible 4 https://bugs.webkit.org/show_bug.cgi?id=152118 5 6 Reviewed by Martin Robinson. 7 8 In most cases where used, the pointer to the TextureMapper is non-null, so it 9 should really be a reference. The pointer is still used for the 10 TextureMapperLayer member variable which is null until the TextureMapper object 11 is created and set on the root layer. 12 13 * platform/graphics/GraphicsContext3DPrivate.cpp: 14 (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): 15 * platform/graphics/GraphicsContext3DPrivate.h: 16 * platform/graphics/cairo/ImageBufferCairo.cpp: 17 (WebCore::ImageBufferData::paintToTextureMapper): 18 * platform/graphics/cairo/ImageBufferDataCairo.h: 19 * platform/graphics/efl/GraphicsContext3DPrivate.cpp: 20 (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): 21 * platform/graphics/efl/GraphicsContext3DPrivate.h: 22 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: 23 (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): 24 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: 25 * platform/graphics/surfaces/GraphicsSurface.cpp: 26 (WebCore::GraphicsSurface::paintToTextureMapper): 27 * platform/graphics/surfaces/GraphicsSurface.h: 28 * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp: 29 (WebCore::GraphicsSurface::platformPaintToTextureMapper): 30 * platform/graphics/texmap/BitmapTexture.cpp: 31 (WebCore::BitmapTexture::updateContents): 32 * platform/graphics/texmap/BitmapTexture.h: 33 (WebCore::BitmapTexture::applyFilters): 34 * platform/graphics/texmap/BitmapTextureGL.cpp: 35 (WebCore::BitmapTextureGL::applyFilters): 36 * platform/graphics/texmap/BitmapTextureGL.h: 37 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: 38 (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded): 39 * platform/graphics/texmap/TextureMapperBackingStore.h: 40 (WebCore::TextureMapperBackingStore::drawRepaintCounter): 41 * platform/graphics/texmap/TextureMapperFPSCounter.cpp: 42 (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay): 43 * platform/graphics/texmap/TextureMapperFPSCounter.h: 44 * platform/graphics/texmap/TextureMapperLayer.cpp: 45 (WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions): 46 (WebCore::TextureMapperLayer::paint): 47 (WebCore::TextureMapperLayer::paintSelf): 48 (WebCore::TextureMapperLayer::paintSelfAndChildren): 49 (WebCore::TextureMapperLayer::paintUsingOverlapRegions): 50 (WebCore::TextureMapperLayer::applyMask): 51 (WebCore::TextureMapperLayer::paintIntoSurface): 52 (WebCore::commitSurface): 53 (WebCore::TextureMapperLayer::paintWithIntermediateSurface): 54 * platform/graphics/texmap/TextureMapperPlatformLayer.h: 55 (WebCore::TextureMapperPlatformLayer::drawBorder): 56 * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: 57 (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): 58 * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: 59 * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp: 60 (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper): 61 * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h: 62 * platform/graphics/texmap/TextureMapperTile.cpp: 63 (WebCore::TextureMapperTile::updateContents): 64 (WebCore::TextureMapperTile::paint): 65 * platform/graphics/texmap/TextureMapperTile.h: 66 * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp: 67 (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded): 68 (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper): 69 (WebCore::TextureMapperTiledBackingStore::drawBorder): 70 (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter): 71 (WebCore::TextureMapperTiledBackingStore::updateContents): 72 * platform/graphics/texmap/TextureMapperTiledBackingStore.h: 73 1 74 2015-12-15 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 75 -
trunk/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp
r193723 r194103 113 113 } 114 114 #elif USE(TEXTURE_MAPPER) && !USE(COORDINATED_GRAPHICS_THREADED) 115 void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper *textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity)115 void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity) 116 116 { 117 117 if (!m_glContext) … … 135 135 } 136 136 137 TextureMapperGL * texmapGL = static_cast<TextureMapperGL*>(textureMapper);137 TextureMapperGL& texmapGL = static_cast<TextureMapperGL&>(textureMapper); 138 138 TextureMapperGL::Flags flags = TextureMapperGL::ShouldFlipTexture | (m_context->m_attrs.alpha ? TextureMapperGL::ShouldBlend : 0); 139 139 IntSize textureSize(m_context->m_currentWidth, m_context->m_currentHeight); 140 texmapGL ->drawTexture(m_context->m_texture, flags, textureSize, targetRect, matrix, opacity);140 texmapGL.drawTexture(m_context->m_texture, flags, textureSize, targetRect, matrix, opacity); 141 141 #endif // USE(TEXTURE_MAPPER_GL) 142 142 } -
trunk/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.h
r193723 r194103 52 52 virtual void swapBuffersIfNeeded() override; 53 53 #elif USE(TEXTURE_MAPPER) 54 virtual void paintToTextureMapper(TextureMapper *, const FloatRect& target, const TransformationMatrix&, float opacity);54 virtual void paintToTextureMapper(TextureMapper&, const FloatRect& target, const TransformationMatrix&, float opacity); 55 55 #endif 56 56 -
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
r194025 r194103 469 469 470 470 #if ENABLE(ACCELERATED_2D_CANVAS) && !USE(COORDINATED_GRAPHICS_THREADED) 471 void ImageBufferData::paintToTextureMapper(TextureMapper *textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity)471 void ImageBufferData::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity) 472 472 { 473 473 ASSERT(m_texture); … … 478 478 previousActiveContext->makeContextCurrent(); 479 479 480 static_cast<TextureMapperGL *>(textureMapper)->drawTexture(m_texture, TextureMapperGL::ShouldBlend, m_size, targetRect, matrix, opacity);480 static_cast<TextureMapperGL&>(textureMapper).drawTexture(m_texture, TextureMapperGL::ShouldBlend, m_size, targetRect, matrix, opacity); 481 481 } 482 482 #endif -
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferDataCairo.h
r193748 r194103 75 75 RefPtr<cairo_t> m_compositorCr; 76 76 #else 77 virtual void paintToTextureMapper(TextureMapper *, const FloatRect& target, const TransformationMatrix&, float opacity);77 virtual void paintToTextureMapper(TextureMapper&, const FloatRect& target, const TransformationMatrix&, float opacity); 78 78 #endif 79 79 uint32_t m_texture; -
trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp
r173112 r194103 160 160 } 161 161 162 void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper *, const FloatRect& /* target */, const TransformationMatrix&, float /* opacity */)162 void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper&, const FloatRect& /* target */, const TransformationMatrix&, float /* opacity */) 163 163 { 164 164 notImplemented(); -
trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.h
r173112 r194103 37 37 PlatformGraphicsContext3D platformGraphicsContext3D() const; 38 38 void setContextLostCallback(std::unique_ptr<GraphicsContext3D::ContextLostCallback>); 39 virtual void paintToTextureMapper(TextureMapper *, const FloatRect&, const TransformationMatrix&, float) override;39 virtual void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix&, float) override; 40 40 virtual IntSize platformLayerSize() const override; 41 41 virtual uint32_t copyToGraphicsSurface() override; -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
r193836 r194103 627 627 628 628 #if USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) 629 void MediaPlayerPrivateGStreamerBase::paintToTextureMapper(TextureMapper *textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity)629 void MediaPlayerPrivateGStreamerBase::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity) 630 630 { 631 631 if (!m_player->visible()) … … 650 650 651 651 IntSize size = IntSize(GST_VIDEO_INFO_WIDTH(&videoInfo), GST_VIDEO_INFO_HEIGHT(&videoInfo)); 652 texture = textureMapper ->acquireTextureFromPool(size, GST_VIDEO_INFO_HAS_ALPHA(&videoInfo) ? BitmapTexture::SupportsAlpha : BitmapTexture::NoFlag);652 texture = textureMapper.acquireTextureFromPool(size, GST_VIDEO_INFO_HAS_ALPHA(&videoInfo) ? BitmapTexture::SupportsAlpha : BitmapTexture::NoFlag); 653 653 updateTexture(static_cast<BitmapTextureGL&>(*texture), videoInfo); 654 654 } 655 textureMapper ->drawTexture(*texture, targetRect, matrix, opacity);655 textureMapper.drawTexture(*texture, targetRect, matrix, opacity); 656 656 return; 657 657 } … … 679 679 680 680 IntSize size = IntSize(GST_VIDEO_INFO_WIDTH(&videoInfo), GST_VIDEO_INFO_HEIGHT(&videoInfo)); 681 TextureMapperGL * textureMapperGL = reinterpret_cast<TextureMapperGL*>(textureMapper);682 textureMapperGL ->drawTexture(textureID, flags, size, targetRect, matrix, opacity);681 TextureMapperGL& textureMapperGL = reinterpret_cast<TextureMapperGL&>(textureMapper); 682 textureMapperGL.drawTexture(textureID, flags, size, targetRect, matrix, opacity); 683 683 gst_video_frame_unmap(&videoFrame); 684 684 #endif -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h
r193836 r194103 111 111 virtual bool supportsAcceleratedRendering() const override { return true; } 112 112 #endif 113 virtual void paintToTextureMapper(TextureMapper *, const FloatRect&, const TransformationMatrix&, float) override;113 virtual void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix&, float) override; 114 114 #endif 115 115 -
trunk/Source/WebCore/platform/graphics/surfaces/GraphicsSurface.cpp
r156700 r194103 64 64 } 65 65 66 void GraphicsSurface::paintToTextureMapper(TextureMapper *textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity)66 void GraphicsSurface::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity) 67 67 { 68 68 platformPaintToTextureMapper(textureMapper, targetRect, transform, opacity); -
trunk/Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
r177429 r194103 78 78 void copyToGLTexture(uint32_t target, uint32_t texture, const IntRect& targetRect, const IntPoint& sourceOffset); 79 79 void copyFromTexture(uint32_t texture, const IntRect& sourceRect); 80 void paintToTextureMapper(TextureMapper *, const FloatRect& targetRect, const TransformationMatrix&, float opacity);80 void paintToTextureMapper(TextureMapper&, const FloatRect& targetRect, const TransformationMatrix&, float opacity); 81 81 uint32_t frontBuffer(); 82 82 uint32_t swapBuffers(); … … 98 98 void platformCopyToGLTexture(uint32_t target, uint32_t texture, const IntRect&, const IntPoint&); 99 99 void platformCopyFromTexture(uint32_t texture, const IntRect& sourceRect); 100 void platformPaintToTextureMapper(TextureMapper *, const FloatRect& targetRect, const TransformationMatrix&, float opacity);100 void platformPaintToTextureMapper(TextureMapper&, const FloatRect& targetRect, const TransformationMatrix&, float opacity); 101 101 uint32_t platformFrontBuffer() const; 102 102 uint32_t platformSwapBuffers(); -
trunk/Source/WebCore/platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp
r177429 r194103 176 176 } 177 177 178 void GraphicsSurface::platformPaintToTextureMapper(TextureMapper *textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity)178 void GraphicsSurface::platformPaintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity) 179 179 { 180 180 uint32_t texture = platformGetTextureID(); … … 184 184 TransformationMatrix adjustedTransform = transform; 185 185 adjustedTransform.multiply(TransformationMatrix::rectToRect(m_private->rect(), targetRect)); 186 static_cast<TextureMapperGL *>(textureMapper)->drawTexture(texture, m_private->flags(), m_private->size(), m_private->rect(), adjustedTransform, opacity);186 static_cast<TextureMapperGL&>(textureMapper).drawTexture(texture, m_private->flags(), m_private->size(), m_private->rect(), adjustedTransform, opacity); 187 187 } 188 188 -
trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp
r190344 r194103 34 34 namespace WebCore { 35 35 36 void BitmapTexture::updateContents(TextureMapper *textureMapper, GraphicsLayer* sourceLayer, const IntRect& targetRect, const IntPoint& offset, UpdateContentsFlag updateContentsFlag, float scale)36 void BitmapTexture::updateContents(TextureMapper& textureMapper, GraphicsLayer* sourceLayer, const IntRect& targetRect, const IntPoint& offset, UpdateContentsFlag updateContentsFlag, float scale) 37 37 { 38 38 // Making an unconditionally unaccelerated buffer here is OK because this code … … 44 44 45 45 GraphicsContext& context = imageBuffer->context(); 46 context.setImageInterpolationQuality(textureMapper ->imageInterpolationQuality());47 context.setTextDrawingMode(textureMapper ->textDrawingMode());46 context.setImageInterpolationQuality(textureMapper.imageInterpolationQuality()); 47 context.setTextDrawingMode(textureMapper.textDrawingMode()); 48 48 49 49 IntRect sourceRect(targetRect); -
trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.h
r193893 r194103 66 66 virtual IntSize size() const = 0; 67 67 virtual void updateContents(Image*, const IntRect&, const IntPoint& offset, UpdateContentsFlag) = 0; 68 virtual void updateContents(TextureMapper *, GraphicsLayer*, const IntRect& target, const IntPoint& offset, UpdateContentsFlag, float scale = 1);68 virtual void updateContents(TextureMapper&, GraphicsLayer*, const IntRect& target, const IntPoint& offset, UpdateContentsFlag, float scale = 1); 69 69 virtual void updateContents(const void*, const IntRect& target, const IntPoint& offset, int bytesPerLine, UpdateContentsFlag) = 0; 70 70 virtual bool isValid() const = 0; … … 84 84 inline bool isOpaque() const { return !(m_flags & SupportsAlpha); } 85 85 86 virtual PassRefPtr<BitmapTexture> applyFilters(TextureMapper *, const FilterOperations&) { return this; }86 virtual PassRefPtr<BitmapTexture> applyFilters(TextureMapper&, const FilterOperations&) { return this; } 87 87 88 88 protected: -
trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp
r193893 r194103 222 222 } 223 223 224 PassRefPtr<BitmapTexture> BitmapTextureGL::applyFilters(TextureMapper *textureMapper, const FilterOperations& filters)224 PassRefPtr<BitmapTexture> BitmapTextureGL::applyFilters(TextureMapper& textureMapper, const FilterOperations& filters) 225 225 { 226 226 if (filters.isEmpty()) 227 227 return this; 228 228 229 TextureMapperGL * texmapGL = static_cast<TextureMapperGL*>(textureMapper);230 RefPtr<BitmapTexture> previousSurface = texmapGL ->currentSurface();229 TextureMapperGL& texmapGL = static_cast<TextureMapperGL&>(textureMapper); 230 RefPtr<BitmapTexture> previousSurface = texmapGL.currentSurface(); 231 231 RefPtr<BitmapTexture> resultSurface = this; 232 232 RefPtr<BitmapTexture> intermediateSurface; … … 244 244 if (!last) { 245 245 if (!intermediateSurface) 246 intermediateSurface = texmapGL ->acquireTextureFromPool(contentSize());247 texmapGL ->bindSurface(intermediateSurface.get());246 intermediateSurface = texmapGL.acquireTextureFromPool(contentSize()); 247 texmapGL.bindSurface(intermediateSurface.get()); 248 248 } 249 249 … … 253 253 } 254 254 255 texmapGL ->drawFiltered(*resultSurface.get(), spareSurface.get(), *filter, j);255 texmapGL.drawFiltered(*resultSurface.get(), spareSurface.get(), *filter, j); 256 256 if (!j && filter->type() == FilterOperation::DROP_SHADOW) { 257 257 spareSurface = resultSurface; … … 262 262 } 263 263 264 texmapGL ->bindSurface(previousSurface.get());264 texmapGL.bindSurface(previousSurface.get()); 265 265 return resultSurface; 266 266 } -
trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h
r193630 r194103 55 55 virtual bool isBackedByOpenGL() const override { return true; } 56 56 57 virtual PassRefPtr<BitmapTexture> applyFilters(TextureMapper *, const FilterOperations&) override;57 virtual PassRefPtr<BitmapTexture> applyFilters(TextureMapper&, const FilterOperations&) override; 58 58 struct FilterInfo { 59 59 RefPtr<FilterOperation> filter; -
trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
r193630 r194103 550 550 551 551 dirtyRect.scale(pageScaleFactor() * deviceScaleFactor()); 552 backingStore->updateContents( textureMapper, this, m_size, dirtyRect, BitmapTexture::UpdateCanModifyOriginalImageData);552 backingStore->updateContents(*textureMapper, this, m_size, dirtyRect, BitmapTexture::UpdateCanModifyOriginalImageData); 553 553 554 554 m_needsDisplay = false; -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.h
r187002 r194103 40 40 public: 41 41 virtual RefPtr<BitmapTexture> texture() const = 0; 42 virtual void paintToTextureMapper(TextureMapper *, const FloatRect&, const TransformationMatrix&, float) = 0;43 virtual void drawRepaintCounter(TextureMapper *, int /* repaintCount */, const Color&, const FloatRect&, const TransformationMatrix&) { }42 virtual void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix&, float) = 0; 43 virtual void drawRepaintCounter(TextureMapper&, int /* repaintCount */, const Color&, const FloatRect&, const TransformationMatrix&) { } 44 44 virtual ~TextureMapperBackingStore() { } 45 45 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.cpp
r163079 r194103 47 47 } 48 48 49 void TextureMapperFPSCounter::updateFPSAndDisplay(TextureMapper *textureMapper, const FloatPoint& location, const TransformationMatrix& matrix)49 void TextureMapperFPSCounter::updateFPSAndDisplay(TextureMapper& textureMapper, const FloatPoint& location, const TransformationMatrix& matrix) 50 50 { 51 51 if (!m_isShowingFPS) … … 60 60 } 61 61 62 textureMapper ->drawNumber(m_lastFPS, Color::black, location, matrix);62 textureMapper.drawNumber(m_lastFPS, Color::black, location, matrix); 63 63 } 64 64 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.h
r163079 r194103 36 36 public: 37 37 TextureMapperFPSCounter(); 38 void updateFPSAndDisplay(TextureMapper *, const FloatPoint& = FloatPoint::zero(), const TransformationMatrix& = TransformationMatrix());38 void updateFPSAndDisplay(TextureMapper&, const FloatPoint& = FloatPoint::zero(), const TransformationMatrix& = TransformationMatrix()); 39 39 40 40 private: -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
r193630 r194103 32 32 class TextureMapperPaintOptions { 33 33 public: 34 TextureMapperPaintOptions(TextureMapper& textureMapper) 35 : textureMapper(textureMapper) 36 { } 37 38 TextureMapper& textureMapper; 39 TransformationMatrix transform; 34 40 RefPtr<BitmapTexture> surface; 35 float opacity; 36 TransformationMatrix transform; 41 float opacity { 1 }; 37 42 IntSize offset; 38 TextureMapper* textureMapper;39 TextureMapperPaintOptions()40 : opacity(1)41 , textureMapper(0)42 { }43 43 }; 44 44 … … 79 79 computeTransformsRecursive(); 80 80 81 TextureMapperPaintOptions options; 82 options.textureMapper = m_textureMapper; 83 options.textureMapper->bindSurface(0); 81 ASSERT(m_textureMapper); 82 TextureMapperPaintOptions options(*m_textureMapper); 83 options.textureMapper.bindSurface(0); 84 84 85 paintRecursive(options); 85 86 } … … 117 118 118 119 if (m_state.solidColor.isValid() && !m_state.contentsRect.isEmpty() && m_state.solidColor.alpha()) { 119 options.textureMapper ->drawSolidColor(m_state.contentsRect, transform, blendWithOpacity(m_state.solidColor, options.opacity));120 options.textureMapper.drawSolidColor(m_state.contentsRect, transform, blendWithOpacity(m_state.solidColor, options.opacity)); 120 121 if (m_state.showDebugBorders) 121 options.textureMapper ->drawBorder(m_state.debugBorderColor, m_state.debugBorderWidth, layerRect(), transform);122 return; 123 } 124 125 options.textureMapper ->setWrapMode(TextureMapper::StretchWrap);126 options.textureMapper ->setPatternTransform(TransformationMatrix());122 options.textureMapper.drawBorder(m_state.debugBorderColor, m_state.debugBorderWidth, layerRect(), transform); 123 return; 124 } 125 126 options.textureMapper.setWrapMode(TextureMapper::StretchWrap); 127 options.textureMapper.setPatternTransform(TransformationMatrix()); 127 128 128 129 if (m_backingStore) { … … 142 143 if (!m_state.contentsTileSize.isEmpty()) { 143 144 computePatternTransformIfNeeded(); 144 options.textureMapper ->setWrapMode(TextureMapper::RepeatWrap);145 options.textureMapper ->setPatternTransform(m_patternTransform);145 options.textureMapper.setWrapMode(TextureMapper::RepeatWrap); 146 options.textureMapper.setPatternTransform(m_patternTransform); 146 147 } 147 148 … … 173 174 clipTransform.multiply(options.transform); 174 175 clipTransform.multiply(m_currentTransform.combined()); 175 options.textureMapper ->beginClip(clipTransform, layerRect());176 options.textureMapper.beginClip(clipTransform, layerRect()); 176 177 } 177 178 … … 180 181 181 182 if (shouldClip) 182 options.textureMapper ->endClip();183 options.textureMapper.endClip(); 183 184 } 184 185 … … 329 330 330 331 for (auto& rect : rects) { 331 if (!rect.intersects(options.textureMapper ->clipBounds()))332 if (!rect.intersects(options.textureMapper.clipBounds())) 332 333 continue; 333 334 334 options.textureMapper ->beginClip(TransformationMatrix(), rect);335 options.textureMapper.beginClip(TransformationMatrix(), rect); 335 336 paintSelfAndChildrenWithReplica(options); 336 options.textureMapper ->endClip();337 options.textureMapper.endClip(); 337 338 } 338 339 … … 344 345 } 345 346 346 IntSize maxTextureSize = options.textureMapper ->maxTextureSize();347 IntRect adjustedClipBounds(options.textureMapper ->clipBounds());347 IntSize maxTextureSize = options.textureMapper.maxTextureSize(); 348 IntRect adjustedClipBounds(options.textureMapper.clipBounds()); 348 349 adjustedClipBounds.move(-options.offset); 349 350 for (auto& rect : rects) { … … 363 364 void TextureMapperLayer::applyMask(const TextureMapperPaintOptions& options) 364 365 { 365 options.textureMapper ->setMaskMode(true);366 options.textureMapper.setMaskMode(true); 366 367 paintSelf(options); 367 options.textureMapper ->setMaskMode(false);368 options.textureMapper.setMaskMode(false); 368 369 } 369 370 370 371 PassRefPtr<BitmapTexture> TextureMapperLayer::paintIntoSurface(const TextureMapperPaintOptions& options, const IntSize& size) 371 372 { 372 RefPtr<BitmapTexture> surface = options.textureMapper ->acquireTextureFromPool(size);373 RefPtr<BitmapTexture> surface = options.textureMapper.acquireTextureFromPool(size); 373 374 TextureMapperPaintOptions paintOptions(options); 374 375 paintOptions.surface = surface; 375 options.textureMapper ->bindSurface(surface.get());376 options.textureMapper.bindSurface(surface.get()); 376 377 paintSelfAndChildren(paintOptions); 377 378 if (m_state.maskLayer) 378 379 m_state.maskLayer->applyMask(options); 379 380 surface = surface->applyFilters(options.textureMapper, m_currentFilters); 380 options.textureMapper ->bindSurface(surface.get());381 options.textureMapper.bindSurface(surface.get()); 381 382 return surface.release(); 382 383 } … … 384 385 static void commitSurface(const TextureMapperPaintOptions& options, PassRefPtr<BitmapTexture> surface, const IntRect& rect, float opacity) 385 386 { 386 options.textureMapper ->bindSurface(options.surface.get());387 options.textureMapper.bindSurface(options.surface.get()); 387 388 TransformationMatrix targetTransform; 388 389 targetTransform.translate(options.offset.width(), options.offset.height()); 389 390 targetTransform.multiply(options.transform); 390 options.textureMapper ->drawTexture(*surface.get(), rect, targetTransform, opacity);391 options.textureMapper.drawTexture(*surface.get(), rect, targetTransform, opacity); 391 392 } 392 393 … … 414 415 mainSurface = paintIntoSurface(paintOptions, rect.size()); 415 416 if (replicaSurface) { 416 options.textureMapper ->bindSurface(replicaSurface.get());417 options.textureMapper ->drawTexture(*mainSurface.get(), FloatRect(FloatPoint::zero(), rect.size()));417 options.textureMapper.bindSurface(replicaSurface.get()); 418 options.textureMapper.drawTexture(*mainSurface.get(), FloatRect(FloatPoint::zero(), rect.size())); 418 419 mainSurface = replicaSurface; 419 420 } -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h
r156282 r194103 40 40 TextureMapperPlatformLayer() : m_client(0) { } 41 41 virtual ~TextureMapperPlatformLayer() { } 42 virtual void paintToTextureMapper(TextureMapper *, const FloatRect&, const TransformationMatrix& modelViewMatrix = TransformationMatrix(), float opacity = 1.0) = 0;42 virtual void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix& modelViewMatrix = TransformationMatrix(), float opacity = 1.0) = 0; 43 43 virtual void swapBuffers() { } 44 virtual void drawBorder(TextureMapper *textureMapper, const Color& color, float borderWidth, const FloatRect& targetRect, const TransformationMatrix& transform)44 virtual void drawBorder(TextureMapper& textureMapper, const Color& color, float borderWidth, const FloatRect& targetRect, const TransformationMatrix& transform) 45 45 { 46 textureMapper ->drawBorder(color, borderWidth, targetRect, transform);46 textureMapper.drawBorder(color, borderWidth, targetRect, transform); 47 47 } 48 48 void setClient(TextureMapperPlatformLayer::Client* client) -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp
r193630 r194103 50 50 } 51 51 52 void TextureMapperPlatformLayerBuffer::paintToTextureMapper(TextureMapper *textureMapper, const FloatRect& targetRect, const TransformationMatrix& modelViewMatrix, float opacity)52 void TextureMapperPlatformLayerBuffer::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& modelViewMatrix, float opacity) 53 53 { 54 54 if (m_hasManagedTexture) { 55 55 ASSERT(m_texture); 56 textureMapper ->drawTexture(*m_texture, targetRect, modelViewMatrix, opacity);56 textureMapper.drawTexture(*m_texture, targetRect, modelViewMatrix, opacity); 57 57 return; 58 58 } 59 59 60 60 ASSERT(m_textureID); 61 TextureMapperGL * texmapGL = static_cast<TextureMapperGL*>(textureMapper);62 texmapGL ->drawTexture(m_textureID, m_extraFlags, m_size, targetRect, modelViewMatrix, opacity);61 TextureMapperGL& texmapGL = static_cast<TextureMapperGL&>(textureMapper); 62 texmapGL.drawTexture(m_textureID, m_extraFlags, m_size, targetRect, modelViewMatrix, opacity); 63 63 } 64 64 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h
r193630 r194103 43 43 virtual ~TextureMapperPlatformLayerBuffer() = default; 44 44 45 virtual void paintToTextureMapper(TextureMapper *, const FloatRect&, const TransformationMatrix& modelViewMatrix = TransformationMatrix(), float opacity = 1.0) final;45 virtual void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix& modelViewMatrix = TransformationMatrix(), float opacity = 1.0) final; 46 46 47 47 bool canReuseWithoutReset(const IntSize&, GC3Dint internalFormat); -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp
r187002 r194103 45 45 } 46 46 47 void TextureMapperSurfaceBackingStore::paintToTextureMapper(TextureMapper *textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity)47 void TextureMapperSurfaceBackingStore::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity) 48 48 { 49 49 if (m_graphicsSurface) -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.h
r187002 r194103 38 38 void swapBuffersIfNeeded(uint32_t frontBuffer); 39 39 virtual RefPtr<BitmapTexture> texture() const; 40 virtual void paintToTextureMapper(TextureMapper *, const FloatRect&, const TransformationMatrix&, float);40 virtual void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix&, float); 41 41 virtual ~TextureMapperSurfaceBackingStore() { } 42 42 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp
r190344 r194103 30 30 class GraphicsLayer; 31 31 32 void TextureMapperTile::updateContents(TextureMapper *textureMapper, Image* image, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag)32 void TextureMapperTile::updateContents(TextureMapper& textureMapper, Image* image, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag) 33 33 { 34 34 IntRect targetRect = enclosingIntRect(m_rect); … … 44 44 targetRect.move(-m_rect.x(), -m_rect.y()); 45 45 if (!m_texture) { 46 m_texture = textureMapper ->createTexture();46 m_texture = textureMapper.createTexture(); 47 47 m_texture->reset(targetRect.size(), image->currentFrameKnownToBeOpaque() ? 0 : BitmapTexture::SupportsAlpha); 48 48 } … … 51 51 } 52 52 53 void TextureMapperTile::updateContents(TextureMapper *textureMapper, GraphicsLayer* sourceLayer, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag, float scale)53 void TextureMapperTile::updateContents(TextureMapper& textureMapper, GraphicsLayer* sourceLayer, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag, float scale) 54 54 { 55 55 IntRect targetRect = enclosingIntRect(m_rect); … … 63 63 64 64 if (!m_texture) { 65 m_texture = textureMapper ->createTexture();65 m_texture = textureMapper.createTexture(); 66 66 m_texture->reset(targetRect.size(), BitmapTexture::SupportsAlpha); 67 67 } … … 70 70 } 71 71 72 void TextureMapperTile::paint(TextureMapper *textureMapper, const TransformationMatrix& transform, float opacity, const unsigned exposedEdges)72 void TextureMapperTile::paint(TextureMapper& textureMapper, const TransformationMatrix& transform, float opacity, const unsigned exposedEdges) 73 73 { 74 74 if (texture().get()) 75 textureMapper ->drawTexture(*texture().get(), rect(), transform, opacity, exposedEdges);75 textureMapper.drawTexture(*texture().get(), rect(), transform, opacity, exposedEdges); 76 76 } 77 77 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperTile.h
r190344 r194103 40 40 inline void setRect(const FloatRect& rect) { m_rect = rect; } 41 41 42 void updateContents(TextureMapper *, Image*, const IntRect&, BitmapTexture::UpdateContentsFlag UpdateCanModifyOriginalImageData);43 void updateContents(TextureMapper *, GraphicsLayer*, const IntRect&, BitmapTexture::UpdateContentsFlag UpdateCanModifyOriginalImageData, float scale = 1);44 virtual void paint(TextureMapper *, const TransformationMatrix&, float, const unsigned exposedEdges);42 void updateContents(TextureMapper&, Image*, const IntRect&, BitmapTexture::UpdateContentsFlag UpdateCanModifyOriginalImageData); 43 void updateContents(TextureMapper&, GraphicsLayer*, const IntRect&, BitmapTexture::UpdateContentsFlag UpdateCanModifyOriginalImageData, float scale = 1); 44 virtual void paint(TextureMapper&, const TransformationMatrix&, float, const unsigned exposedEdges); 45 45 virtual ~TextureMapperTile() { } 46 46 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperTiledBackingStore.cpp
r193828 r194103 31 31 class GraphicsLayer; 32 32 33 void TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded(TextureMapper *textureMapper)33 void TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded(TextureMapper& textureMapper) 34 34 { 35 35 if (!m_image) … … 48 48 } 49 49 50 void TextureMapperTiledBackingStore::paintToTextureMapper(TextureMapper *textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity)50 void TextureMapperTiledBackingStore::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity) 51 51 { 52 52 updateContentsFromImageIfNeeded(textureMapper); … … 56 56 } 57 57 58 void TextureMapperTiledBackingStore::drawBorder(TextureMapper *textureMapper, const Color& borderColor, float borderWidth, const FloatRect& targetRect, const TransformationMatrix& transform)58 void TextureMapperTiledBackingStore::drawBorder(TextureMapper& textureMapper, const Color& borderColor, float borderWidth, const FloatRect& targetRect, const TransformationMatrix& transform) 59 59 { 60 60 TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(targetRect); 61 61 for (auto& tile : m_tiles) 62 textureMapper ->drawBorder(borderColor, borderWidth, tile.rect(), adjustedTransform);62 textureMapper.drawBorder(borderColor, borderWidth, tile.rect(), adjustedTransform); 63 63 } 64 64 65 void TextureMapperTiledBackingStore::drawRepaintCounter(TextureMapper *textureMapper, int repaintCount, const Color& borderColor, const FloatRect& targetRect, const TransformationMatrix& transform)65 void TextureMapperTiledBackingStore::drawRepaintCounter(TextureMapper& textureMapper, int repaintCount, const Color& borderColor, const FloatRect& targetRect, const TransformationMatrix& transform) 66 66 { 67 67 TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(targetRect); 68 68 for (auto& tile : m_tiles) 69 textureMapper ->drawNumber(repaintCount, borderColor, tile.rect().location(), adjustedTransform);69 textureMapper.drawNumber(repaintCount, borderColor, tile.rect().location(), adjustedTransform); 70 70 } 71 71 … … 151 151 } 152 152 153 void TextureMapperTiledBackingStore::updateContents(TextureMapper *textureMapper, Image* image, const FloatSize& totalSize, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag)153 void TextureMapperTiledBackingStore::updateContents(TextureMapper& textureMapper, Image* image, const FloatSize& totalSize, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag) 154 154 { 155 createOrDestroyTilesIfNeeded(totalSize, textureMapper ->maxTextureSize(), !image->currentFrameKnownToBeOpaque());155 createOrDestroyTilesIfNeeded(totalSize, textureMapper.maxTextureSize(), !image->currentFrameKnownToBeOpaque()); 156 156 for (auto& tile : m_tiles) 157 157 tile.updateContents(textureMapper, image, dirtyRect, updateContentsFlag); 158 158 } 159 159 160 void TextureMapperTiledBackingStore::updateContents(TextureMapper *textureMapper, GraphicsLayer* sourceLayer, const FloatSize& totalSize, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag)160 void TextureMapperTiledBackingStore::updateContents(TextureMapper& textureMapper, GraphicsLayer* sourceLayer, const FloatSize& totalSize, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag) 161 161 { 162 createOrDestroyTilesIfNeeded(totalSize, textureMapper ->maxTextureSize(), true);162 createOrDestroyTilesIfNeeded(totalSize, textureMapper.maxTextureSize(), true); 163 163 for (auto& tile : m_tiles) 164 164 tile.updateContents(textureMapper, sourceLayer, dirtyRect, updateContentsFlag, m_contentsScale); -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperTiledBackingStore.h
r190344 r194103 39 39 40 40 virtual RefPtr<BitmapTexture> texture() const override; 41 virtual void paintToTextureMapper(TextureMapper *, const FloatRect&, const TransformationMatrix&, float) override;42 virtual void drawBorder(TextureMapper *, const Color&, float borderWidth, const FloatRect&, const TransformationMatrix&) override;43 virtual void drawRepaintCounter(TextureMapper *, int repaintCount, const Color&, const FloatRect&, const TransformationMatrix&) override;41 virtual void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix&, float) override; 42 virtual void drawBorder(TextureMapper&, const Color&, float borderWidth, const FloatRect&, const TransformationMatrix&) override; 43 virtual void drawRepaintCounter(TextureMapper&, int repaintCount, const Color&, const FloatRect&, const TransformationMatrix&) override; 44 44 45 45 void updateContentsScale(float); 46 void updateContents(TextureMapper *, Image*, const FloatSize&, const IntRect&, BitmapTexture::UpdateContentsFlag);47 void updateContents(TextureMapper *, GraphicsLayer*, const FloatSize&, const IntRect&, BitmapTexture::UpdateContentsFlag);46 void updateContents(TextureMapper&, Image*, const FloatSize&, const IntRect&, BitmapTexture::UpdateContentsFlag); 47 void updateContents(TextureMapper&, GraphicsLayer*, const FloatSize&, const IntRect&, BitmapTexture::UpdateContentsFlag); 48 48 49 49 void setContentsToImage(Image* image) { m_image = image; } … … 53 53 54 54 void createOrDestroyTilesIfNeeded(const FloatSize& backingStoreSize, const IntSize& tileSize, bool hasAlpha); 55 void updateContentsFromImageIfNeeded(TextureMapper *);55 void updateContentsFromImageIfNeeded(TextureMapper&); 56 56 TransformationMatrix adjustedTransformForRect(const FloatRect&); 57 57 inline FloatRect rect() const -
trunk/Source/WebKit/win/ChangeLog
r192903 r194103 1 2015-12-15 Zan Dobersek <zdobersek@igalia.com> 2 3 [TexMap] Operate with a reference to the TextureMapper wherever possible 4 https://bugs.webkit.org/show_bug.cgi?id=152118 5 6 Reviewed by Martin Robinson. 7 8 * WebCoreSupport/AcceleratedCompositingContext.cpp: 9 (AcceleratedCompositingContext::compositeLayersToContext): TextureMapper object 10 is now operated with through a reference. 11 1 12 2015-12-01 Darin Adler <darin@apple.com> 2 13 -
trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp
r189165 r194103 188 188 m_textureMapper->beginPainting(); 189 189 downcast<GraphicsLayerTextureMapper>(*m_rootLayer).layer().paint(); 190 m_fpsCounter.updateFPSAndDisplay( m_textureMapper.get());190 m_fpsCounter.updateFPSAndDisplay(*m_textureMapper); 191 191 m_textureMapper->endPainting(); 192 192 -
trunk/Source/WebKit2/ChangeLog
r194095 r194103 1 2015-12-15 Zan Dobersek <zdobersek@igalia.com> 2 3 [TexMap] Operate with a reference to the TextureMapper wherever possible 4 https://bugs.webkit.org/show_bug.cgi?id=152118 5 6 Reviewed by Martin Robinson. 7 8 Replace pointers to the TextureMapper object with references. 9 10 * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp: 11 (WebKit::CoordinatedBackingStoreTile::swapBuffers): 12 (WebKit::CoordinatedBackingStore::paintTilesToTextureMapper): 13 (WebKit::CoordinatedBackingStore::paintToTextureMapper): 14 (WebKit::CoordinatedBackingStore::drawBorder): 15 (WebKit::CoordinatedBackingStore::drawRepaintCounter): 16 (WebKit::CoordinatedBackingStore::commitTileOperations): 17 * Shared/CoordinatedGraphics/CoordinatedBackingStore.h: 18 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: 19 (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext): 20 (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext): 21 (WebKit::CoordinatedGraphicsScene::commitPendingBackingStoreOperations): 22 1 23 2015-12-14 YongGeol Jung <yg48.jung@samsung.com> 2 24 -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp
r187002 r194103 31 31 namespace WebKit { 32 32 33 void CoordinatedBackingStoreTile::swapBuffers(TextureMapper *textureMapper)33 void CoordinatedBackingStoreTile::swapBuffers(TextureMapper& textureMapper) 34 34 { 35 35 if (!m_surface) … … 45 45 RefPtr<BitmapTexture> texture = this->texture(); 46 46 if (!texture) { 47 texture = textureMapper ->createTexture();47 texture = textureMapper.createTexture(); 48 48 setTexture(texture.get()); 49 49 shouldReset = true; 50 50 } 51 51 52 ASSERT(textureMapper ->maxTextureSize().width() >= m_tileRect.size().width());53 ASSERT(textureMapper ->maxTextureSize().height() >= m_tileRect.size().height());52 ASSERT(textureMapper.maxTextureSize().width() >= m_tileRect.size().width()); 53 ASSERT(textureMapper.maxTextureSize().height() >= m_tileRect.size().height()); 54 54 if (shouldReset) 55 55 texture->reset(m_tileRect.size(), m_surface->supportsAlpha()); … … 108 108 } 109 109 110 void CoordinatedBackingStore::paintTilesToTextureMapper(Vector<TextureMapperTile*>& tiles, TextureMapper *textureMapper, const TransformationMatrix& transform, float opacity, const FloatRect& rect)110 void CoordinatedBackingStore::paintTilesToTextureMapper(Vector<TextureMapperTile*>& tiles, TextureMapper& textureMapper, const TransformationMatrix& transform, float opacity, const FloatRect& rect) 111 111 { 112 112 for (auto& tile : tiles) … … 119 119 } 120 120 121 void CoordinatedBackingStore::paintToTextureMapper(TextureMapper *textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity)121 void CoordinatedBackingStore::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity) 122 122 { 123 123 if (m_tiles.isEmpty()) … … 156 156 } 157 157 158 void CoordinatedBackingStore::drawBorder(TextureMapper *textureMapper, const Color& borderColor, float borderWidth, const FloatRect& targetRect, const TransformationMatrix& transform)158 void CoordinatedBackingStore::drawBorder(TextureMapper& textureMapper, const Color& borderColor, float borderWidth, const FloatRect& targetRect, const TransformationMatrix& transform) 159 159 { 160 160 TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(targetRect); 161 161 for (auto& tile : m_tiles.values()) 162 textureMapper ->drawBorder(borderColor, borderWidth, tile.rect(), adjustedTransform);162 textureMapper.drawBorder(borderColor, borderWidth, tile.rect(), adjustedTransform); 163 163 } 164 164 165 void CoordinatedBackingStore::drawRepaintCounter(TextureMapper *textureMapper, int repaintCount, const Color& borderColor, const FloatRect& targetRect, const TransformationMatrix& transform)165 void CoordinatedBackingStore::drawRepaintCounter(TextureMapper& textureMapper, int repaintCount, const Color& borderColor, const FloatRect& targetRect, const TransformationMatrix& transform) 166 166 { 167 167 TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(targetRect); 168 168 for (auto& tile : m_tiles.values()) 169 textureMapper ->drawNumber(repaintCount, borderColor, tile.rect().location(), adjustedTransform);169 textureMapper.drawNumber(repaintCount, borderColor, tile.rect().location(), adjustedTransform); 170 170 } 171 171 172 void CoordinatedBackingStore::commitTileOperations(TextureMapper *textureMapper)172 void CoordinatedBackingStore::commitTileOperations(TextureMapper& textureMapper) 173 173 { 174 174 if (!m_pendingSize.isZero()) { -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedBackingStore.h
r192628 r194103 45 45 46 46 inline float scale() const { return m_scale; } 47 void swapBuffers(WebCore::TextureMapper *);47 void swapBuffers(WebCore::TextureMapper&); 48 48 void setBackBuffer(const WebCore::IntRect&, const WebCore::IntRect&, PassRefPtr<WebCore::CoordinatedSurface> buffer, const WebCore::IntPoint&); 49 49 … … 63 63 void updateTile(uint32_t tileID, const WebCore::IntRect&, const WebCore::IntRect&, PassRefPtr<WebCore::CoordinatedSurface>, const WebCore::IntPoint&); 64 64 static Ref<CoordinatedBackingStore> create() { return adoptRef(*new CoordinatedBackingStore); } 65 void commitTileOperations(WebCore::TextureMapper *);65 void commitTileOperations(WebCore::TextureMapper&); 66 66 RefPtr<WebCore::BitmapTexture> texture() const override; 67 67 void setSize(const WebCore::FloatSize&); 68 virtual void paintToTextureMapper(WebCore::TextureMapper *, const WebCore::FloatRect&, const WebCore::TransformationMatrix&, float) override;69 virtual void drawBorder(WebCore::TextureMapper *, const WebCore::Color&, float borderWidth, const WebCore::FloatRect&, const WebCore::TransformationMatrix&) override;70 virtual void drawRepaintCounter(WebCore::TextureMapper *, int repaintCount, const WebCore::Color&, const WebCore::FloatRect&, const WebCore::TransformationMatrix&) override;68 virtual void paintToTextureMapper(WebCore::TextureMapper&, const WebCore::FloatRect&, const WebCore::TransformationMatrix&, float) override; 69 virtual void drawBorder(WebCore::TextureMapper&, const WebCore::Color&, float borderWidth, const WebCore::FloatRect&, const WebCore::TransformationMatrix&) override; 70 virtual void drawRepaintCounter(WebCore::TextureMapper&, int repaintCount, const WebCore::Color&, const WebCore::FloatRect&, const WebCore::TransformationMatrix&) override; 71 71 72 72 private: … … 74 74 : m_scale(1.) 75 75 { } 76 void paintTilesToTextureMapper(Vector<WebCore::TextureMapperTile*>&, WebCore::TextureMapper *, const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&);76 void paintTilesToTextureMapper(Vector<WebCore::TextureMapperTile*>&, WebCore::TextureMapper&, const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&); 77 77 WebCore::TransformationMatrix adjustedTransformForRect(const WebCore::FloatRect&); 78 78 WebCore::FloatRect rect() const { return WebCore::FloatRect(WebCore::FloatPoint::zero(), m_size); } -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
r193901 r194103 111 111 112 112 currentRootLayer->paint(); 113 m_fpsCounter.updateFPSAndDisplay( m_textureMapper.get(), clipRect.location(), matrix);113 m_fpsCounter.updateFPSAndDisplay(*m_textureMapper, clipRect.location(), matrix); 114 114 m_textureMapper->endClip(); 115 115 m_textureMapper->endPainting(); … … 144 144 145 145 layer->paint(); 146 m_fpsCounter.updateFPSAndDisplay( m_textureMapper.get(), clipRect.location());146 m_fpsCounter.updateFPSAndDisplay(*m_textureMapper, clipRect.location()); 147 147 m_textureMapper->endPainting(); 148 148 m_textureMapper->setGraphicsContext(0); … … 585 585 { 586 586 for (auto& backingStore : m_backingStoresWithPendingBuffers) 587 backingStore->commitTileOperations( m_textureMapper.get());587 backingStore->commitTileOperations(*m_textureMapper); 588 588 589 589 m_backingStoresWithPendingBuffers.clear();
Note: See TracChangeset
for help on using the changeset viewer.