Changeset 206830 in webkit
- Timestamp:
- Oct 5, 2016 2:16:27 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 added
- 45 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r206828 r206830 1 2016-10-05 Brent Fulgham <bfulgham@apple.com> 2 3 [Win][Direct2D] Disable some CoreGraphics and CoreAnimation-based logic when building for D2D 4 https://bugs.webkit.org/show_bug.cgi?id=162977 5 6 Reviewed by Alex Christensen. 7 8 Currently the Direct2D implementation does not support some of the accelerated compositing 9 features that require CoreAnimation. During this bring-up, we want to disable these routines 10 so that we can build and run in (mostly) unaccelerated drawing. 11 12 This patch mostly consists of adding "#if USE(CG)" and "#if USE(CA)" to files that are 13 specific to those implementations. 14 15 This change should have no impact on non-Direct2D ports. 16 17 No change in behavior for active ports. 18 19 * config.h: Turn of CG when building in Direct2D. 20 * css/CSSFontFaceSource.cpp: 21 * loader/cache/CachedFont.cpp: 22 * loader/cache/CachedSVGFont.cpp: 23 * page/CaptionUserPreferencesMediaAF.cpp: 24 * page/win/FrameCGWin.cpp: 25 * page/win/FrameDirect2D.cpp: Added. 26 * platform/graphics/Font.cpp: 27 * platform/graphics/FontCache.cpp: 28 * platform/graphics/FontPlatformData.cpp: 29 * platform/graphics/GraphicsContext.h: 30 * platform/graphics/Image.cpp: 31 * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: 32 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: 33 * platform/graphics/ca/GraphicsLayerCA.cpp: 34 * platform/graphics/ca/PlatformCALayer.cpp: 35 * platform/graphics/ca/TileController.cpp: 36 * platform/graphics/ca/TileGrid.cpp: 37 * platform/graphics/ca/TileGrid.h: 38 * platform/graphics/ca/win/CACFLayerTreeHost.cpp: 39 * platform/graphics/ca/win/LayerChangesFlusher.cpp: 40 * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: 41 * platform/graphics/ca/win/PlatformCAAnimationWin.h: 42 * platform/graphics/ca/win/PlatformCAFiltersWin.cpp: 43 * platform/graphics/ca/win/PlatformCALayerWin.cpp: 44 * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: 45 * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: 46 * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: 47 * platform/graphics/cg/GradientCG.cpp: 48 * platform/graphics/cg/GraphicsContextCG.cpp: 49 * platform/graphics/cg/ImageBufferCG.cpp: 50 * platform/graphics/cg/ImageBufferDataCG.cpp: 51 * platform/graphics/cg/PDFDocumentImage.cpp: 52 * platform/graphics/cg/PatternCG.cpp: 53 * platform/graphics/cg/SubimageCacheWithTimer.cpp: 54 * platform/graphics/win/FontCGWin.cpp: 55 * platform/graphics/win/FontPlatformDataCGWin.cpp: 56 * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: 57 * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp: 58 * platform/graphics/win/GradientDirect2D.cpp: 59 * platform/graphics/win/PathDirect2D.cpp: Fix a few build problems I didn't notice 60 while building without Direct2D active. 61 * platform/graphics/win/SimpleFontDataCGWin.cpp: 62 * platform/graphics/win/SimpleFontDataWin.cpp: 63 * platform/win/DragImageCGWin.cpp: 64 * platform/win/DragImageDirect2D.cpp: Added. 65 * rendering/RenderMediaControls.cpp: 66 1 67 2016-10-05 Chris Dumez <cdumez@apple.com> 2 68 -
trunk/Source/WebCore/config.h
r198850 r206830 95 95 #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h 96 96 #endif 97 #elif USE(DIRECT2D) 98 #undef USE_CG 97 99 #elif !USE(WINGDI) 98 100 #define USE_CG 1 -
trunk/Source/WebCore/css/CSSFontFaceSource.cpp
r201676 r206830 48 48 #endif 49 49 50 #if USE(DIRECT2D) 51 #include <dwrite.h> 52 #endif 53 50 54 namespace WebCore { 51 55 -
trunk/Source/WebCore/loader/cache/CachedFont.cpp
r206016 r206830 40 40 #include "WOFFFileFormat.h" 41 41 #include <wtf/Vector.h> 42 43 #if USE(DIRECT2D) 44 #include <dwrite.h> 45 #endif 42 46 43 47 namespace WebCore { -
trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp
r206016 r206830 40 40 #include "TypedElementDescendantIterator.h" 41 41 #include "SVGToOTFFontConversion.h" 42 43 #if USE(DIRECT2D) 44 #include <dwrite.h> 45 #endif 42 46 43 47 namespace WebCore { -
trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
r206145 r206830 27 27 28 28 #if ENABLE(VIDEO_TRACK) 29 30 #if !USE(DIRECT2D) 29 31 30 32 #include "CaptionUserPreferencesMediaAF.h" … … 966 968 } 967 969 970 #endif 971 968 972 #endif // ENABLE(VIDEO_TRACK) -
trunk/Source/WebCore/page/win/FrameCGWin.cpp
r194439 r206830 26 26 #include "config.h" 27 27 #include "FrameWin.h" 28 29 #if USE(CG) 28 30 29 31 #include "BitmapInfo.h" … … 84 86 85 87 } // namespace WebCore 88 89 #endif -
trunk/Source/WebCore/platform/graphics/Font.cpp
r205826 r206830 43 43 #if ENABLE(OPENTYPE_VERTICAL) 44 44 #include "OpenTypeVerticalData.h" 45 #endif 46 47 #if USE(DIRECT2D) 48 #include <dwrite.h> 45 49 #endif 46 50 -
trunk/Source/WebCore/platform/graphics/FontCache.cpp
r204466 r206830 46 46 #endif 47 47 48 #if USE(DIRECT2D) 49 #include <dwrite.h> 50 #endif 51 48 52 #if PLATFORM(IOS) 49 53 #include <wtf/Noncopyable.h> -
trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp
r205883 r206830 30 30 #include "SharedBuffer.h" 31 31 #include <CoreGraphics/CGFont.h> 32 #endif 33 34 #if USE(DIRECT2D) 35 #include <dwrite.h> 32 36 #endif 33 37 -
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
r206780 r206830 580 580 #if USE(DIRECT2D) 581 581 void platformInit(HDC, ID2D1RenderTarget**, RECT, bool hasAlpha = false); 582 void platformInit(ID2D1RenderTarget*);583 582 void drawWithoutShadow(const FloatRect& boundingRect, const std::function<void(ID2D1RenderTarget*)>&); 584 583 void drawWithShadow(const FloatRect& boundingRect, const std::function<void(ID2D1RenderTarget*)>&); -
trunk/Source/WebCore/platform/graphics/Image.cpp
r206631 r206830 93 93 void Image::drawTiled(GraphicsContext& ctxt, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& scaledTileSize, const FloatSize& spacing, CompositeOperator op, BlendMode blendMode) 94 94 { 95 #if USE(DIRECT2D) 96 notImplemented(); 97 #else 95 98 Color color = singlePixelSolidColor(); 96 99 if (color.isValid()) { … … 200 203 startAnimation(); 201 204 #endif 205 #endif 202 206 } 203 207 -
trunk/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp
r206811 r206830 55 55 { 56 56 UNUSED_PARAM(mimeType); 57 57 #if USE(DIRECT2D) 58 UNUSED_PARAM(initData); 59 UNUSED_PARAM(destinationURL); 60 UNUSED_PARAM(errorCode); 61 UNUSED_PARAM(systemCode); 62 notImplemented(); 63 return nullptr; 64 #else 58 65 String keyURI; 59 66 String keyID; … … 102 109 RefPtr<ArrayBuffer> keyRequestBuffer = ArrayBuffer::create(CFDataGetBytePtr(keyRequest.get()), CFDataGetLength(keyRequest.get())); 103 110 return Uint8Array::create(keyRequestBuffer, 0, keyRequestBuffer->byteLength()); 111 #endif 104 112 } 105 113 -
trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp
r206811 r206830 864 864 context.setImageInterpolationQuality(InterpolationLow); 865 865 FloatRect paintRect(FloatPoint(), rect.size()); 866 #if USE(DIRECT2D) 867 notImplemented(); 868 #else 866 869 CGContextDrawImage(context.platformContext(), CGRectMake(0, 0, paintRect.width(), paintRect.height()), image.get()); 870 #endif 867 871 context.restore(); 868 872 image = 0; -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r206196 r206830 27 27 28 28 #include "GraphicsLayerCA.h" 29 30 #if USE(CA) 29 31 30 32 #include "Animation.h" … … 3994 3996 3995 3997 } // namespace WebCore 3998 3999 #endif -
trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp
r204658 r206830 27 27 #include "PlatformCALayer.h" 28 28 29 #if USE(CA) 30 29 31 #include <CoreFoundation/CoreFoundation.h> 30 32 #include <CoreText/CoreText.h> … … 38 40 #include "CoreTextSPIWin.h" 39 41 #endif 40 41 #if USE(CA)42 42 43 43 namespace WebCore { -
trunk/Source/WebCore/platform/graphics/ca/TileController.cpp
r200465 r206830 27 27 #include "TileController.h" 28 28 29 #if USE(CG) 30 29 31 #include "IntRect.h" 30 32 #include "Logging.h" … … 736 738 737 739 } // namespace WebCore 740 741 #endif -
trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp
r203261 r206830 25 25 26 26 #include "config.h" 27 28 #if USE(CG) 29 27 30 #include "TileGrid.h" 28 31 … … 763 766 764 767 } // namespace WebCore 768 769 #endif -
trunk/Source/WebCore/platform/graphics/ca/TileGrid.h
r203261 r206830 52 52 ~TileGrid(); 53 53 54 #if USE(CA) 54 55 PlatformCALayer& containerLayer() { return m_containerLayer; } 56 #endif 55 57 56 58 void setIsZoomedOutTileGrid(bool); … … 84 86 unsigned blankPixelCount() const; 85 87 88 #if USE(CG) 86 89 void drawTileMapContents(CGContextRef, CGRect layerBounds) const; 90 #endif 87 91 88 92 #if PLATFORM(IOS) … … 151 155 152 156 TileController& m_controller; 157 #if USE(CA) 153 158 Ref<PlatformCALayer> m_containerLayer; 159 #endif 154 160 155 161 typedef HashMap<TileIndex, TileInfo> TileMap; -
trunk/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp
r206234 r206830 27 27 #include "CACFLayerTreeHost.h" 28 28 29 #if USE(CA) 30 29 31 #include "CACFLayerTreeHostClient.h" 30 32 #include "DebugPageOverlays.h" … … 375 377 376 378 } 379 380 #endif -
trunk/Source/WebCore/platform/graphics/ca/win/LayerChangesFlusher.cpp
r189883 r206830 26 26 #include "config.h" 27 27 #include "LayerChangesFlusher.h" 28 29 #if USE(CA) 28 30 29 31 #include "AbstractCACFLayerTreeHost.h" … … 130 132 131 133 } // namespace WebCore 134 135 #endif -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.cpp
r174715 r206830 26 26 #include "config.h" 27 27 28 #if PLATFORM(WIN) 28 #if PLATFORM(WIN) && USE(CA) 29 29 #include "PlatformCAAnimationWin.h" 30 30 -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.h
r197563 r206830 27 27 #define PlatformCAAnimationWin_h 28 28 29 #if PLATFORM(WIN) 29 #if PLATFORM(WIN) && USE(CA) 30 30 31 31 #include "PlatformCAAnimation.h" -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAFiltersWin.cpp
r173268 r206830 27 27 #include "PlatformCAFilters.h" 28 28 29 #if USE(CA) 30 29 31 using namespace WebCore; 30 32 … … 45 47 return ""; 46 48 } 49 50 #endif -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
r201915 r206830 28 28 #include "PlatformCALayerWin.h" 29 29 30 #if USE(CA) 31 30 32 #include "AbstractCACFLayerTreeHost.h" 31 33 #include "FontCascade.h" … … 954 956 cg.drawText(font, TextRun(text), IntPoint(x, y)); 955 957 } 958 959 #endif -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp
r192140 r206830 28 28 #include "PlatformCALayerWinInternal.h" 29 29 30 #if USE(CA) 31 30 32 #include "FontCascade.h" 31 33 #include "GraphicsContext.h" … … 324 326 CACFLayerSetBorderColor(owner()->platformLayer(), color.get()); 325 327 } 328 329 #endif -
trunk/Source/WebCore/platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp
r194235 r206830 27 27 #include "WKCACFViewLayerTreeHost.h" 28 28 29 #if USE(CA) 30 29 31 #include "GDIUtilities.h" 30 32 #include "PlatformCALayer.h" … … 198 200 199 201 } // namespace WebCore 202 203 #endif -
trunk/Source/WebCore/platform/graphics/ca/win/WebTiledBackingLayerWin.cpp
r190616 r206830 26 26 #include "config.h" 27 27 #include "WebTiledBackingLayerWin.h" 28 29 #if USE(CA) 28 30 29 31 #include "GraphicsContext.h" … … 181 183 m_tileController = nullptr; 182 184 } 185 186 #endif -
trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp
r192712 r206830 27 27 #include "config.h" 28 28 #include "Gradient.h" 29 30 #if USE(CG) 29 31 30 32 #include "GraphicsContextCG.h" … … 106 108 107 109 } //namespace 110 111 #endif -
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
r206631 r206830 27 27 #include "config.h" 28 28 #include "GraphicsContextCG.h" 29 30 #if USE(CG) 29 31 30 32 #include "AffineTransform.h" … … 1049 1051 } 1050 1052 1051 1052 1053 return enclosingIntRect(CGContextGetClipBoundingBox(platformContext())); 1053 1054 } … … 1906 1907 1907 1908 } 1909 1910 #endif -
trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
r206706 r206830 29 29 #include "ImageBuffer.h" 30 30 31 #if USE(CG) 32 31 33 #include "BitmapImage.h" 32 34 #include "GraphicsContext.h" … … 592 594 593 595 } // namespace WebCore 596 597 #endif -
trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp
r202887 r206830 27 27 #include "ImageBufferData.h" 28 28 29 #if USE(CG) 30 29 31 #include "GraphicsContext.h" 30 32 #include "IntRect.h" … … 545 547 546 548 } // namespace WebCore 549 550 #endif -
trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp
r206635 r206830 39 39 #include "IntRect.h" 40 40 #include "Length.h" 41 #include "NotImplemented.h" 41 42 #include "SharedBuffer.h" 42 43 #include "TextStream.h" … … 345 346 context.translate(-m_cropBox.x(), -m_cropBox.y()); 346 347 348 #if USE(DIRECT2D) 349 notImplemented(); 350 #else 347 351 // CGPDF pages are indexed from 1. 348 352 CGContextDrawPDFPage(context.platformContext(), CGPDFDocumentGetPage(m_document.get(), 1)); 353 #endif 349 354 } 350 355 -
trunk/Source/WebCore/platform/graphics/cg/PatternCG.cpp
r205682 r206830 27 27 #include "config.h" 28 28 #include "Pattern.h" 29 30 #if USE(CG) 29 31 30 32 #include "AffineTransform.h" … … 91 93 92 94 } 95 96 #endif -
trunk/Source/WebCore/platform/graphics/cg/SubimageCacheWithTimer.cpp
r176459 r206830 26 26 #include "config.h" 27 27 #include "SubimageCacheWithTimer.h" 28 29 #if USE(CG) 28 30 29 31 #include <wtf/Vector.h> … … 115 117 116 118 #endif 119 120 #endif -
trunk/Source/WebCore/platform/graphics/win/FontCGWin.cpp
r206597 r206830 27 27 #include "FontCascade.h" 28 28 29 #if USE(CG) 30 29 31 #include "AffineTransform.h" 30 32 #include "FloatConversion.h" … … 219 221 220 222 } 223 224 #endif -
trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp
r206597 r206830 24 24 #include "config.h" 25 25 #include "FontPlatformData.h" 26 27 #if USE(CG) 26 28 27 29 #include "SharedGDIObject.h" … … 136 138 137 139 } 140 141 #endif -
trunk/Source/WebCore/platform/graphics/win/GlyphPageTreeNodeCGWin.cpp
r192895 r206830 30 30 #include "GlyphPage.h" 31 31 32 #if USE(CG) 33 32 34 #include "Font.h" 33 35 #include <WebKitSystemInterface/WebKitSystemInterface.h> … … 59 61 60 62 } 63 64 #endif -
trunk/Source/WebCore/platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp
r206597 r206830 30 30 31 31 #include "Font.h" 32 #include "TextAnaly sisHelper.h"32 #include "TextAnalyzerHelper.h" 33 33 #include <dwrite.h> 34 34 -
trunk/Source/WebCore/platform/graphics/win/GradientDirect2D.cpp
r206815 r206830 99 99 ASSERT(m_p0 == m_p1); 100 100 101 D2D1_MATRIX_3X2_F ctm ;101 D2D1_MATRIX_3X2_F ctm = { }; 102 102 d2dContext->GetTransform(&ctm); 103 103 -
trunk/Source/WebCore/platform/graphics/win/PathDirect2D.cpp
r206815 r206830 337 337 } 338 338 339 static equalRadiusWidths(const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius)339 static bool equalRadiusWidths(const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius) 340 340 { 341 341 return topLeftRadius.width() == topRightRadius.width() … … 344 344 } 345 345 346 static equalRadiusHeights(const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius)346 static bool equalRadiusHeights(const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius) 347 347 { 348 348 return topLeftRadius.height() == bottomLeftRadius.height() … … 415 415 drawArcSection(m_activePath.get(), center, radius, startAngle, firstArcEnd, clockwise); 416 416 417 if ( areEssentiallyEqual(firstArcEnd, endAngle))417 if (WTF::areEssentiallyEqual(firstArcEnd, endAngle)) 418 418 return; 419 419 -
trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp
r204858 r206830 29 29 #include "config.h" 30 30 #include "Font.h" 31 32 #if USE(CG) 31 33 32 34 #include "CoreTextSPIWin.h" … … 153 155 154 156 } 157 158 #endif -
trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp
r200094 r206830 38 38 #include <wtf/win/GDIObject.h> 39 39 40 #if USE(DIRECT2D) 41 #include <dwrite.h> 42 #endif 43 40 44 namespace WebCore { 41 45 -
trunk/Source/WebCore/platform/win/DragImageCGWin.cpp
r205682 r206830 26 26 #include "config.h" 27 27 #include "DragImage.h" 28 29 #if USE(CG) 28 30 29 31 #include "BitmapInfo.h" … … 147 149 148 150 } 151 152 #endif -
trunk/Source/WebCore/rendering/RenderMediaControls.cpp
r189144 r206830 33 33 #include "HTMLMediaElement.h" 34 34 #include "HTMLNames.h" 35 #include "NotImplemented.h" 35 36 #include "PaintInfo.h" 36 37 #include "RenderTheme.h" … … 129 130 bool RenderMediaControls::paintMediaControlsPart(MediaControlElementType part, const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r) 130 131 { 132 #if USE(DIRECT2D) 133 UNUSED_PARAM(part); 134 UNUSED_PARAM(o); 135 UNUSED_PARAM(paintInfo); 136 UNUSED_PARAM(r); 137 notImplemented(); 138 #else 131 139 GraphicsContextStateSaver stateSaver(paintInfo.context()); 132 140 … … 215 223 break; 216 224 } 217 225 #endif 218 226 return false; 219 227 }
Note: See TracChangeset
for help on using the changeset viewer.