Changeset 216502 in webkit
- Timestamp:
- May 9, 2017 5:38:43 AM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r216501 r216502 1 2017-05-09 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> 2 3 [Coordinated Graphics] Debug Visuals don't hide 4 https://bugs.webkit.org/show_bug.cgi?id=162704 5 6 Reviewed by Žan Doberšek. 7 8 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: 9 (WebCore::CoordinatedGraphicsLayer::setShowDebugBorder): 10 (WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter): 11 (WebCore::CoordinatedGraphicsLayer::syncLayerState): 12 (WebCore::CoordinatedGraphicsLayer::setDebugBorder): 13 showDebugBorders() and showRepaintCounter() of CoordinatedGraphicsLayer should reflect 14 the "show" argument to the layer state. 15 16 * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h: 17 (WebCore::DebugVisuals::DebugVisuals): 18 (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState): 19 To set the debug visuals of a layer, the visibility flags of the borders and the repaint 20 counters as well as the border width and color are needed. Thus a new bundle struct 21 DebugVisuals and its change flag debugVisualsChanged have been introduced in order to 22 send the information at once. 23 1 24 2017-05-09 Yusuke Suzuki <utatane.tea@gmail.com> 2 25 -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
r215469 r216502 4 4 Copyright (C) 2012 Company 100, Inc. 5 5 Copyright (C) 2012 Intel Corporation. All rights reserved. 6 Copyright (C) 2017 Sony Interactive Entertainment Inc. 6 7 7 8 This library is free software; you can redistribute it and/or … … 448 449 449 450 GraphicsLayer::setShowDebugBorder(show); 450 m_layerState. showDebugBorders = true;451 m_layerState. flagsChanged = true;451 m_layerState.debugVisuals.showDebugBorders = show; 452 m_layerState.debugVisualsChanged = true; 452 453 453 454 didChangeLayerState(); … … 460 461 461 462 GraphicsLayer::setShowRepaintCounter(show); 462 m_layerState. showRepaintCounter = true;463 m_layerState. flagsChanged = true;463 m_layerState.debugVisuals.showRepaintCounter = show; 464 m_layerState.debugVisualsChanged = true; 464 465 465 466 didChangeLayerState(); … … 662 663 m_layerState.preserves3D = preserves3D(); 663 664 m_layerState.fixedToViewport = fixedToViewport(); 664 m_layerState.showDebugBorders = isShowingDebugBorder();665 m_layerState.showRepaintCounter = isShowingRepaintCounter();666 665 m_layerState.isScrollable = isScrollable(); 667 666 } 668 667 669 if (m_layerState.showDebugBorders) 668 if (m_layerState.debugVisualsChanged) { 669 m_layerState.debugVisuals.showDebugBorders = isShowingDebugBorder(); 670 m_layerState.debugVisuals.showRepaintCounter = isShowingRepaintCounter(); 671 } 672 673 if (m_layerState.debugVisuals.showDebugBorders) 670 674 updateDebugIndicators(); 671 675 } … … 673 677 void CoordinatedGraphicsLayer::setDebugBorder(const Color& color, float width) 674 678 { 675 ASSERT(m_layerState. showDebugBorders);676 if (m_layerState.debug BorderColor != color) {677 m_layerState.debug BorderColor = color;678 m_layerState.debug BorderColorChanged = true;679 } 680 681 if (m_layerState.debug BorderWidth != width) {682 m_layerState.debug BorderWidth = width;683 m_layerState.debug BorderWidthChanged = true;679 ASSERT(m_layerState.debugVisuals.showDebugBorders); 680 if (m_layerState.debugVisuals.debugBorderColor != color) { 681 m_layerState.debugVisuals.debugBorderColor = color; 682 m_layerState.debugVisualsChanged = true; 683 } 684 685 if (m_layerState.debugVisuals.debugBorderWidth != width) { 686 m_layerState.debugVisuals.debugBorderWidth = width; 687 m_layerState.debugVisualsChanged = true; 684 688 } 685 689 } -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h
r216101 r216502 2 2 * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies) 3 3 * Copyright (C) 2013 Company 100, Inc. All rights reserved. 4 * Copyright (C) 2017 Sony Interactive Entertainment Inc. 4 5 * 5 6 * Redistribution and use in source and binary forms, with or without … … 65 66 }; 66 67 68 struct DebugVisuals { 69 DebugVisuals() 70 : showDebugBorders(false) 71 , showRepaintCounter(false) { } 72 Color debugBorderColor; 73 float debugBorderWidth { 0 }; 74 union { 75 struct { 76 bool showDebugBorders : 1; 77 bool showRepaintCounter : 1; 78 }; 79 unsigned flags; 80 }; 81 }; 82 67 83 struct CoordinatedGraphicsLayerState { 68 84 union { … … 76 92 bool opacityChanged: 1; 77 93 bool solidColorChanged: 1; 78 bool debugBorderColorChanged: 1; 79 bool debugBorderWidthChanged: 1; 94 bool debugVisualsChanged: 1; 80 95 bool replicaChanged: 1; 81 96 bool maskChanged: 1; … … 104 119 bool preserves3D : 1; 105 120 bool fixedToViewport : 1; 106 bool showDebugBorders : 1;107 bool showRepaintCounter : 1;108 121 bool isScrollable: 1; 109 122 }; … … 120 133 , preserves3D(false) 121 134 , fixedToViewport(false) 122 , showDebugBorders(false)123 , showRepaintCounter(false)124 135 , isScrollable(false) 125 136 , opacity(0) 126 , debugBorderWidth(0)127 137 , replica(InvalidCoordinatedLayerID) 128 138 , mask(InvalidCoordinatedLayerID) … … 145 155 float opacity; 146 156 Color solidColor; 147 Color debugBorderColor;148 float debugBorderWidth;149 157 FilterOperations filters; 150 158 TextureMapperAnimations animations; … … 155 163 CoordinatedLayerID mask; 156 164 CoordinatedImageBackingID imageID; 165 DebugVisuals debugVisuals; 157 166 158 167 unsigned repaintCount; -
trunk/Source/WebKit2/ChangeLog
r216497 r216502 1 2017-05-09 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> 2 3 [Coordinated Graphics] Debug Visuals don't hide 4 https://bugs.webkit.org/show_bug.cgi?id=162704 5 6 Reviewed by Žan Doberšek. 7 8 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: 9 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode): 10 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode): 11 (IPC::ArgumentCoder<DebugVisuals>::encode): 12 (IPC::ArgumentCoder<DebugVisuals>::decode): 13 The encoder and decoder for DebugVisuals have been added. 14 15 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h: 16 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: 17 (WebKit::CoordinatedGraphicsScene::setLayerState): 18 Update the debug visuals of a layer according to the DebugVisuals information 19 if the debugVisualsChanged flag is set to true. 20 1 21 2017-05-09 Zan Dobersek <zdobersek@igalia.com> 2 22 -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp
r216101 r216502 3 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 4 4 * Copyright (C) 2012 Company 100, Inc. 5 * Copyright (C) 2017 Sony Interactive Entertainment Inc. 5 6 * 6 7 * Redistribution and use in source and binary forms, with or without … … 646 647 encoder << state.solidColor; 647 648 648 if (state.debugBorderColorChanged) 649 encoder << state.debugBorderColor; 650 651 if (state.debugBorderWidthChanged) 652 encoder << state.debugBorderWidth; 649 if (state.debugVisualsChanged) 650 encoder << state.debugVisuals; 653 651 654 652 if (state.filtersChanged) … … 721 719 return false; 722 720 723 if (state.debugBorderColorChanged && !decoder.decode(state.debugBorderColor)) 724 return false; 725 726 if (state.debugBorderWidthChanged && !decoder.decode(state.debugBorderWidth)) 721 if (state.debugVisualsChanged && !decoder.decode(state.debugVisuals)) 727 722 return false; 728 723 … … 916 911 } 917 912 913 void ArgumentCoder<DebugVisuals>::encode(Encoder& encoder, const DebugVisuals& debugVisuals) 914 { 915 encoder << debugVisuals.debugBorderColor; 916 encoder << debugVisuals.debugBorderWidth; 917 encoder << debugVisuals.flags; 918 } 919 920 bool ArgumentCoder<DebugVisuals>::decode(Decoder& decoder, DebugVisuals& debugVisuals) 921 { 922 if (!decoder.decode(debugVisuals.debugBorderColor)) 923 return false; 924 925 if (!decoder.decode(debugVisuals.debugBorderWidth)) 926 return false; 927 928 if (!decoder.decode(debugVisuals.flags)) 929 return false; 930 931 return true; 932 } 933 918 934 } // namespace IPC 919 935 -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h
r212638 r216502 3 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 4 4 * Copyright (C) 2012 Company 100, Inc. 5 * Copyright (C) 2017 Sony Interactive Entertainment Inc. 5 6 * 6 7 * Redistribution and use in source and binary forms, with or without … … 44 45 class TransformOperations; 45 46 struct Length; 47 struct DebugVisuals; 46 48 47 49 class FilterOperations; … … 95 97 }; 96 98 99 template<> struct ArgumentCoder<WebCore::DebugVisuals> { 100 static void encode(Encoder&, const WebCore::DebugVisuals&); 101 static bool decode(Decoder&, WebCore::DebugVisuals&); 102 }; 103 97 104 } // namespace IPC 98 105 -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
r216101 r216502 2 2 Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 3 3 Copyright (C) 2012 Company 100, Inc. 4 Copyright (C) 2017 Sony Interactive Entertainment Inc. 4 5 5 6 This library is free software; you can redistribute it and/or … … 233 234 layer->setSolidColor(layerState.solidColor); 234 235 235 if (layerState.debug BorderColorChanged || layerState.debugBorderWidthChanged)236 layer->setDebugVisuals(layerState. showDebugBorders, layerState.debugBorderColor, layerState.debugBorderWidth, layerState.showRepaintCounter);236 if (layerState.debugVisualsChanged) 237 layer->setDebugVisuals(layerState.debugVisuals.showDebugBorders, layerState.debugVisuals.debugBorderColor, layerState.debugVisuals.debugBorderWidth, layerState.debugVisuals.showRepaintCounter); 237 238 238 239 if (layerState.replicaChanged)
Note: See TracChangeset
for help on using the changeset viewer.