Changeset 197923 in webkit
- Timestamp:
- Mar 9, 2016, 9:26:25 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r197922 r197923 1 2016-03-09 Simon Fraser <simon.fraser@apple.com> 2 3 Font antialiasing (smoothing) changes when elements are rendered into compositing layers 4 https://bugs.webkit.org/show_bug.cgi?id=23364 5 rdar://problem/7288429 6 7 Reviewed by Tim Horton. 8 9 Improve the appearance of subpixel-antialiased ("smoothed") text in non-opaque layers 10 by opting in to a new CALayer backing store format. 11 12 GraphicsLayer now has setSupportsSmoothedFonts(), which is called by RenderLayerBacking 13 when the platform has support for the new feature. Ideally this would only be set when 14 we know a layer has smoothed text drawn into it, but, for now, enable this for all 15 layers. The right thing happens with opaque layers under the hood. 16 17 setSupportsSmoothedFonts() is turned into a PlatformCALayer contentsFormat flag, which 18 is ultimately passed to setBackingStoreFormat(). 19 20 We also need to propagate this flag to TileController tiles. 21 22 * platform/graphics/GraphicsLayer.cpp: 23 (WebCore::GraphicsLayer::supportsSmoothedFontsInNonOpaqueLayers): 24 (WebCore::GraphicsLayer::GraphicsLayer): 25 * platform/graphics/GraphicsLayer.h: 26 (WebCore::GraphicsLayer::supportsSmoothedFonts): 27 (WebCore::GraphicsLayer::setSupportsSmoothedFonts): 28 * platform/graphics/TiledBacking.h: 29 * platform/graphics/ca/GraphicsLayerCA.cpp: 30 (WebCore::GraphicsLayer::supportsSmoothedFontsInNonOpaqueLayers): 31 (WebCore::GraphicsLayerCA::setSupportsSmoothedFonts): 32 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): 33 (WebCore::GraphicsLayerCA::updateContentsFormat): 34 * platform/graphics/ca/GraphicsLayerCA.h: 35 * platform/graphics/ca/PlatformCALayer.cpp: 36 (WebCore::PlatformCALayer::drawRepaintIndicator): Give the number a "shadow" when 37 the contents format says we support smoothed fonts. 38 * platform/graphics/ca/PlatformCALayer.h: 39 * platform/graphics/ca/TileController.cpp: 40 (WebCore::TileController::setTileContentsFormatFlags): 41 (WebCore::TileController::createTileLayer): 42 * platform/graphics/ca/TileController.h: 43 * platform/graphics/ca/TileGrid.cpp: 44 (WebCore::TileGrid::updateTileLayerProperties): 45 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h: 46 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: 47 (WebCore::setBackingStoreFormat): 48 (PlatformCALayerCocoa::commonInit): 49 (PlatformCALayerCocoa::setContentsFormat): 50 (PlatformCALayer::drawLayerContents): Previously, we turned off font smoothing in 51 non-opaque layers to improve text appearance. We no longer need to do that when 52 the contents format has "SmoothedFonts". 53 * platform/ios/LegacyTileGridTile.mm: 54 (WebCore::setBackingStoreFormat): 55 (WebCore::LegacyTileGridTile::LegacyTileGridTile): 56 * rendering/RenderLayerBacking.cpp: 57 (WebCore::RenderLayerBacking::createGraphicsLayer): 58 1 59 2016-03-09 Gavin Barraclough <barraclough@apple.com> 2 60 -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp
r195515 r197923 106 106 #endif 107 107 108 #if !USE(CA) 109 bool GraphicsLayer::supportsSmoothedFontsInNonOpaqueLayers() 110 { 111 return false; 112 } 113 #endif 114 108 115 GraphicsLayer::GraphicsLayer(Type type, GraphicsLayerClient& client) 109 116 : m_client(client) … … 116 123 , m_type(type) 117 124 , m_contentsOpaque(false) 125 , m_supportsSmoothedFonts(false) 118 126 , m_preserves3D(false) 119 127 , m_backfaceVisibility(true) -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r197563 r197923 365 365 virtual void setContentsOpaque(bool b) { m_contentsOpaque = b; } 366 366 367 bool supportsSmoothedFonts() const { return m_supportsSmoothedFonts; } 368 virtual void setSupportsSmoothedFonts(bool b) { m_supportsSmoothedFonts = b; } 369 367 370 bool backfaceVisibility() const { return m_backfaceVisibility; } 368 371 virtual void setBackfaceVisibility(bool b) { m_backfaceVisibility = b; } … … 541 544 static bool supportsLayerType(Type); 542 545 static bool supportsContentsTiling(); 546 static bool supportsSmoothedFontsInNonOpaqueLayers(); 543 547 544 548 void updateDebugIndicators(); … … 614 618 615 619 bool m_contentsOpaque : 1; 620 bool m_supportsSmoothedFonts : 1; 616 621 bool m_preserves3D: 1; 617 622 bool m_backfaceVisibility : 1; -
trunk/Source/WebCore/platform/graphics/TiledBacking.h
r197541 r197923 80 80 virtual void setTopContentInset(float) = 0; 81 81 82 virtual void setTileContentsFormatFlags(unsigned) = 0; 83 82 84 virtual void setVelocity(const VelocityData&) = 0; 83 85 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r197541 r197923 310 310 } 311 311 312 bool GraphicsLayer::supportsSmoothedFontsInNonOpaqueLayers() 313 { 314 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 315 return true; 316 #endif 317 return false; 318 } 319 312 320 std::unique_ptr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerFactory* factory, GraphicsLayerClient& client, Type layerType) 313 321 { … … 708 716 GraphicsLayer::setContentsOpaque(opaque); 709 717 noteLayerPropertyChanged(ContentsOpaqueChanged); 718 } 719 720 void GraphicsLayerCA::setSupportsSmoothedFonts(bool supportsSmoothedFonts) 721 { 722 if (m_supportsSmoothedFonts == supportsSmoothedFonts) 723 return; 724 725 GraphicsLayer::setSupportsSmoothedFonts(supportsSmoothedFonts); 726 noteLayerPropertyChanged(ContentsFormatChanged); 710 727 } 711 728 … … 1581 1598 updateContentsOpaque(pageScaleFactor); 1582 1599 1600 if (m_uncommittedChanges & ContentsFormatChanged) 1601 updateContentsFormat(); 1602 1583 1603 if (m_uncommittedChanges & BackfaceVisibilityChanged) 1584 1604 updateBackfaceVisibility(); … … 1888 1908 for (auto& layer : layerCloneMap->values()) 1889 1909 layer->setOpaque(contentsOpaque); 1910 } 1911 } 1912 1913 void GraphicsLayerCA::updateContentsFormat() 1914 { 1915 PlatformCALayer::ContentsFormatFlags formatFlags = 0; 1916 if (supportsSmoothedFonts()) 1917 formatFlags |= PlatformCALayer::SmoothedFonts; 1918 1919 m_layer->setContentsFormat(formatFlags); 1920 1921 if (LayerMap* layerCloneMap = m_layerClones.get()) { 1922 for (auto& layer : layerCloneMap->values()) 1923 layer->setContentsFormat(formatFlags); 1890 1924 } 1891 1925 } -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r197563 r197923 96 96 97 97 WEBCORE_EXPORT void setContentsOpaque(bool) override; 98 WEBCORE_EXPORT void setSupportsSmoothedFonts(bool) override; 99 98 100 WEBCORE_EXPORT void setBackfaceVisibility(bool) override; 99 101 … … 392 394 void updateContentsVisibility(); 393 395 void updateContentsOpaque(float pageScaleFactor); 396 void updateContentsFormat(); 394 397 void updateBackfaceVisibility(); 395 398 void updateStructuralLayer(); … … 456 459 457 460 enum LayerChange : uint64_t { 458 NoChange = 0, 459 NameChanged = 1LLU << 1, 460 ChildrenChanged = 1LLU << 2, // also used for content layer, and preserves-3d, and size if tiling changes? 461 GeometryChanged = 1LLU << 3, 462 TransformChanged = 1LLU << 4, 463 ChildrenTransformChanged = 1LLU << 5, 464 Preserves3DChanged = 1LLU << 6, 465 MasksToBoundsChanged = 1LLU << 7, 466 DrawsContentChanged = 1LLU << 8, 467 BackgroundColorChanged = 1LLU << 9, 468 ContentsOpaqueChanged = 1LLU << 10, 469 BackfaceVisibilityChanged = 1LLU << 11, 470 OpacityChanged = 1LLU << 12, 471 AnimationChanged = 1LLU << 13, 472 DirtyRectsChanged = 1LLU << 14, 473 ContentsImageChanged = 1LLU << 15, 474 ContentsPlatformLayerChanged = 1LLU << 16, 475 ContentsColorLayerChanged = 1LLU << 17, 476 ContentsRectsChanged = 1LLU << 18, 477 MasksToBoundsRectChanged = 1LLU << 19, 478 MaskLayerChanged = 1LLU << 20, 479 ReplicatedLayerChanged = 1LLU << 21, 480 ContentsNeedsDisplay = 1LLU << 22, 481 AcceleratesDrawingChanged = 1LLU << 23, 482 ContentsScaleChanged = 1LLU << 24, 483 ContentsVisibilityChanged = 1LLU << 25, 484 CoverageRectChanged = 1LLU << 26, 485 FiltersChanged = 1LLU << 27, 486 BackdropFiltersChanged = 1LLU << 28, 487 BackdropFiltersRectChanged = 1LLU << 29, 488 TilingAreaChanged = 1LLU << 30, 489 TilesAdded = 1LLU << 31, 490 DebugIndicatorsChanged = 1LLU << 32, 491 CustomAppearanceChanged = 1LLU << 33, 492 BlendModeChanged = 1LLU << 34, 493 ShapeChanged = 1LLU << 35, 494 WindRuleChanged = 1LLU << 36, 461 NoChange = 0, 462 NameChanged = 1LLU << 1, 463 ChildrenChanged = 1LLU << 2, // also used for content layer, and preserves-3d, and size if tiling changes? 464 GeometryChanged = 1LLU << 3, 465 TransformChanged = 1LLU << 4, 466 ChildrenTransformChanged = 1LLU << 5, 467 Preserves3DChanged = 1LLU << 6, 468 MasksToBoundsChanged = 1LLU << 7, 469 DrawsContentChanged = 1LLU << 8, 470 BackgroundColorChanged = 1LLU << 9, 471 ContentsOpaqueChanged = 1LLU << 10, 472 ContentsFormatChanged = 1LLU << 11, 473 BackfaceVisibilityChanged = 1LLU << 12, 474 OpacityChanged = 1LLU << 13, 475 AnimationChanged = 1LLU << 14, 476 DirtyRectsChanged = 1LLU << 15, 477 ContentsImageChanged = 1LLU << 16, 478 ContentsPlatformLayerChanged = 1LLU << 17, 479 ContentsColorLayerChanged = 1LLU << 18, 480 ContentsRectsChanged = 1LLU << 19, 481 MasksToBoundsRectChanged = 1LLU << 20, 482 MaskLayerChanged = 1LLU << 21, 483 ReplicatedLayerChanged = 1LLU << 22, 484 ContentsNeedsDisplay = 1LLU << 23, 485 AcceleratesDrawingChanged = 1LLU << 24, 486 ContentsScaleChanged = 1LLU << 25, 487 ContentsVisibilityChanged = 1LLU << 26, 488 CoverageRectChanged = 1LLU << 27, 489 FiltersChanged = 1LLU << 28, 490 BackdropFiltersChanged = 1LLU << 29, 491 BackdropFiltersRectChanged = 1LLU << 30, 492 TilingAreaChanged = 1LLU << 31, 493 TilesAdded = 1LLU << 32, 494 DebugIndicatorsChanged = 1LLU << 33, 495 CustomAppearanceChanged = 1LLU << 34, 496 BlendModeChanged = 1LLU << 35, 497 ShapeChanged = 1LLU << 36, 498 WindRuleChanged = 1LLU << 37, 495 499 }; 496 500 typedef uint64_t LayerChangeFlags; -
trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp
r194825 r197923 81 81 82 82 CGContextFillRect(context, indicatorBox); 83 83 84 if (platformCALayer->owner()->isUsingDisplayListDrawing(platformCALayer)) { 85 CGContextSetRGBStrokeColor(context, 0, 0, 0, 0.65); 86 CGContextSetLineWidth(context, 2); 87 CGContextStrokeRect(context, indicatorBox); 88 } 89 90 if (!platformCALayer->isOpaque() && (platformCALayer->contentsFormat() & SmoothedFonts)) { 91 CGContextSetRGBFillColor(context, 1, 1, 1, 0.4); 92 platformCALayer->drawTextAtPoint(context, indicatorBox.origin.x + 7, indicatorBox.origin.y + 24, CGSizeMake(1, -1), 22, text, strlen(text)); 93 } 94 84 95 if (platformCALayer->acceleratesDrawing()) 85 96 CGContextSetRGBFillColor(context, 1, 0, 0, 1); 86 97 else 87 98 CGContextSetRGBFillColor(context, 1, 1, 1, 1); 88 89 if (platformCALayer->owner()->isUsingDisplayListDrawing(platformCALayer)) {90 CGContextSetRGBStrokeColor(context, 0, 0, 0, 0.65);91 CGContextSetLineWidth(context, 2);92 CGContextStrokeRect(context, indicatorBox);93 }94 99 95 100 platformCALayer->drawTextAtPoint(context, indicatorBox.origin.x + 5, indicatorBox.origin.y + 22, CGSizeMake(1, -1), 22, text, strlen(text)); -
trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h
r193382 r197923 140 140 virtual void setOpaque(bool) = 0; 141 141 142 enum ContentsFormatFlag { 143 DeepColor = 1 << 0, 144 SmoothedFonts = 1 << 1, 145 }; 146 typedef unsigned ContentsFormatFlags; 147 virtual void setContentsFormat(ContentsFormatFlags) = 0; 148 virtual ContentsFormatFlags contentsFormat() const = 0; 149 142 150 virtual FloatRect bounds() const = 0; 143 151 virtual void setBounds(const FloatRect&) = 0; -
trunk/Source/WebCore/platform/graphics/ca/TileController.cpp
r197593 r197923 176 176 } 177 177 178 void TileController::setTileContentsFormatFlags(PlatformCALayer::ContentsFormatFlags flags) 179 { 180 if (flags == m_contentsFormatFlags) 181 return; 182 183 m_contentsFormatFlags = flags; 184 tileGrid().updateTileLayerProperties(); 185 } 186 178 187 void TileController::setVisibleRect(const FloatRect& rect) 179 188 { … … 676 685 layer->setEdgeAntialiasingMask(0); 677 686 layer->setOpaque(m_tilesAreOpaque); 687 layer->setContentsFormat(m_contentsFormatFlags); 678 688 #ifndef NDEBUG 679 689 layer->setName("Tile"); -
trunk/Source/WebCore/platform/graphics/ca/TileController.h
r197593 r197923 78 78 WEBCORE_EXPORT void setTilesOpaque(bool); 79 79 bool tilesAreOpaque() const { return m_tilesAreOpaque; } 80 81 void setTileContentsFormatFlags(PlatformCALayer::ContentsFormatFlags) override; 82 PlatformCALayer::ContentsFormatFlags tileContentsFormatFlags() const { return m_contentsFormatFlags; } 80 83 81 84 PlatformCALayer& rootLayer() { return *m_tileCacheLayer; } … … 207 210 int m_marginSize { kDefaultTileSize }; 208 211 212 PlatformCALayer::ContentsFormatFlags m_contentsFormatFlags { 0 }; 213 209 214 // m_marginTop and m_marginBottom are the height in pixels of the top and bottom margin tiles. The width 210 215 // of those tiles will be equivalent to the width of the other tiles in the grid. m_marginRight and -
trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp
r197594 r197923 176 176 bool acceleratesDrawing = m_controller.acceleratesDrawing(); 177 177 bool opaque = m_controller.tilesAreOpaque(); 178 PlatformCALayer::ContentsFormatFlags formatFlags = m_controller.tileContentsFormatFlags(); 178 179 Color tileDebugBorderColor = m_controller.tileDebugBorderColor(); 179 180 float tileDebugBorderWidth = m_controller.tileDebugBorderWidth(); … … 183 184 tileInfo.layer->setAcceleratesDrawing(acceleratesDrawing); 184 185 tileInfo.layer->setOpaque(opaque); 186 tileInfo.layer->setContentsFormat(formatFlags); 185 187 tileInfo.layer->setBorderColor(tileDebugBorderColor); 186 188 tileInfo.layer->setBorderWidth(tileDebugBorderWidth); -
trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.h
r197563 r197923 72 72 bool isOpaque() const override; 73 73 void setOpaque(bool) override; 74 75 void setContentsFormat(ContentsFormatFlags) override; 76 ContentsFormatFlags contentsFormat() const override { return m_contentsFormatFlags; } 74 77 75 78 FloatRect bounds() const override; … … 180 183 GraphicsLayer::CustomAppearance m_customAppearance; 181 184 std::unique_ptr<FloatRoundedRect> m_shapeRoundedRect; 185 ContentsFormatFlags m_contentsFormatFlags { 0 }; 182 186 }; 183 187 -
trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
r197382 r197923 70 70 #else 71 71 namespace WebCore { 72 static void setBackingStoreFormat(CALayer * )72 static void setBackingStoreFormat(CALayer *, PlatformCALayer::ContentsFormatFlags) 73 73 { 74 74 } … … 309 309 310 310 if (m_layerType == LayerTypeWebLayer || m_layerType == LayerTypeTiledBackingTileLayer) 311 setBackingStoreFormat(m_layer.get() );311 setBackingStoreFormat(m_layer.get(), 0); 312 312 313 313 // So that the scrolling thread's performance logging code can find all the tiles, mark this as being a tile. … … 546 546 } 547 547 548 void PlatformCALayerCocoa::setContentsFormat(ContentsFormatFlags flags) 549 { 550 if (flags == m_contentsFormatFlags) 551 return; 552 553 m_contentsFormatFlags = flags; 554 555 if (usesTiledBackingLayer()) { 556 WebTiledBackingLayer* tiledBackingLayer = static_cast<WebTiledBackingLayer*>(m_layer.get()); 557 tiledBackingLayer.tiledBacking->setTileContentsFormatFlags(flags); 558 return; 559 } 560 561 setBackingStoreFormat(m_layer.get(), flags); 562 } 563 548 564 FloatRect PlatformCALayerCocoa::bounds() const 549 565 { … … 1057 1073 graphicsContext.setIsAcceleratedContext(platformCALayer->acceleratesDrawing()); 1058 1074 1059 if (!layerContents->platformCALayerContentsOpaque() ) {1075 if (!layerContents->platformCALayerContentsOpaque() && !(platformCALayer->contentsFormat() & SmoothedFonts)) { 1060 1076 // Turn off font smoothing to improve the appearance of text rendered onto a transparent background. 1061 1077 graphicsContext.setShouldSmoothFonts(false); -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
r192143 r197923 378 378 } 379 379 380 void PlatformCALayerWin::setContentsFormat(ContentsFormatFlags formatFlags) 381 { 382 m_contentsFormat = formatFlags; 383 } 384 385 PlatformCALayer::ContentsFormatFlags PlatformCALayerWin::contentsFormat() const 386 { 387 return m_contentsFormat; 388 } 389 380 390 FloatRect PlatformCALayerWin::bounds() const 381 391 { -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.h
r197563 r197923 64 64 bool isOpaque() const override; 65 65 void setOpaque(bool) override; 66 67 void setContentsFormat(ContentsFormatFlags) override; 68 ContentsFormatFlags contentsFormat() const override; 66 69 67 70 FloatRect bounds() const override; … … 164 167 std::unique_ptr<PlatformCALayerList> m_customSublayers; 165 168 GraphicsLayer::CustomAppearance m_customAppearance; 169 ContentsFormatFlags m_contentsFormat { 0 }; 166 170 }; 167 171 -
trunk/Source/WebCore/platform/ios/LegacyTileGridTile.mm
r195937 r197923 29 29 #if PLATFORM(IOS) 30 30 31 #include "BlockExceptions.h" 31 32 #include "Color.h" 32 33 #include "LegacyTileCache.h" … … 34 35 #include "LegacyTileLayer.h" 35 36 #include "LegacyTileLayerPool.h" 37 #include "PlatformCALayer.h" 36 38 #include "QuartzCoreSPI.h" 37 39 #include "WAKWindow.h" … … 44 46 #else 45 47 namespace WebCore { 46 static void setBackingStoreFormat(CALayer * )48 static void setBackingStoreFormat(CALayer *, PlatformCALayer::ContentsFormatFlags) 47 49 { 48 50 } … … 72 74 } 73 75 LegacyTileLayer* layer = m_tileLayer.get(); 74 setBackingStoreFormat(layer );76 setBackingStoreFormat(layer, 0); 75 77 [layer setTileGrid:tileGrid]; 76 78 [layer setOpaque:m_tileGrid->tileCache().tilesOpaque()]; -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r197628 r197923 179 179 graphicsLayer->setUsesDisplayListDrawing(compositor().displayListDrawingEnabled()); 180 180 #endif 181 182 // FIXME: ideally we'd only do this if the layer contains smoothed text. 183 if (GraphicsLayer::supportsSmoothedFontsInNonOpaqueLayers()) 184 graphicsLayer->setSupportsSmoothedFonts(true); 181 185 182 186 return graphicsLayer; -
trunk/Source/WebKit2/ChangeLog
r197921 r197923 1 2016-03-09 Simon Fraser <simon.fraser@apple.com> 2 3 Font antialiasing (smoothing) changes when elements are rendered into compositing layers 4 https://bugs.webkit.org/show_bug.cgi?id=23364 5 rdar://problem/7288429 6 7 Reviewed by Tim Horton. 8 9 Send the ContentsFormat to the UI process (but nothing happens to it there yet). 10 11 * Shared/mac/RemoteLayerTreeTransaction.h: 12 * Shared/mac/RemoteLayerTreeTransaction.mm: 13 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode): 14 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): 15 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: 16 (WebKit::PlatformCALayerRemote::setContentsFormat): 17 (WebKit::PlatformCALayerRemote::contentsFormat): 18 * WebProcess/WebPage/mac/PlatformCALayerRemote.h: 19 1 20 2016-03-09 Ryosuke Niwa <rniwa@webkit.org> 2 21 -
trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h
r195607 r197923 88 88 AnimationsChanged = 1LLU << 33, 89 89 EdgeAntialiasingMaskChanged = 1LLU << 34, 90 CustomAppearanceChanged = 1LLU << 35, 90 ContentsFormatFlagsChanged = 1LLU << 35, 91 CustomAppearanceChanged = 1LLU << 36, 91 92 }; 92 93 typedef uint64_t LayerChange; … … 154 155 WebCore::Color borderColor; 155 156 unsigned edgeAntialiasingMask; 157 WebCore::PlatformCALayer::ContentsFormatFlags contentsFormatFlags; 156 158 WebCore::GraphicsLayer::CustomAppearance customAppearance; 157 159 WebCore::PlatformCALayer::FilterType minificationFilter; -
trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm
r195607 r197923 212 212 encoder << opaque; 213 213 214 if (changedProperties & ContentsFormatFlagsChanged) 215 encoder << contentsFormatFlags; 216 214 217 if (changedProperties & MaskLayerChanged) 215 218 encoder << maskLayerID; … … 372 375 if (result.changedProperties & OpaqueChanged) { 373 376 if (!decoder.decode(result.opaque)) 377 return false; 378 } 379 380 if (result.changedProperties & ContentsFormatFlagsChanged) { 381 if (!decoder.decode(result.contentsFormatFlags)) 374 382 return false; 375 383 } -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp
r193382 r197923 402 402 } 403 403 404 void PlatformCALayerRemote::setContentsFormat(ContentsFormatFlags formatFlags) 405 { 406 if (formatFlags == m_properties.contentsFormatFlags) 407 return; 408 409 m_properties.contentsFormatFlags = formatFlags; 410 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ContentsFormatFlagsChanged); 411 } 412 413 PlatformCALayer::ContentsFormatFlags PlatformCALayerRemote::contentsFormat() const 414 { 415 return m_properties.contentsFormatFlags; 416 } 417 404 418 void PlatformCALayerRemote::setClonedLayer(const PlatformCALayer* layer) 405 419 { -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h
r197563 r197923 77 77 void setOpaque(bool) override; 78 78 79 void setContentsFormat(ContentsFormatFlags) override; 80 ContentsFormatFlags contentsFormat() const override; 81 79 82 WebCore::FloatRect bounds() const override; 80 83 void setBounds(const WebCore::FloatRect&) override;
Note:
See TracChangeset
for help on using the changeset viewer.