diff options
author | chrishtr <chrishtr@chromium.org> | 2016-02-26 18:52:16 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-27 02:53:35 +0000 |
commit | 49c44c010634e2270ff761ebda343795b5f050d0 (patch) | |
tree | b9a0ca1638289d9d82f49c51113bbad615737eb2 | |
parent | fb0929e9767a61961573e068e29c91644aa9836a (diff) | |
download | chromium_src-49c44c010634e2270ff761ebda343795b5f050d0.zip chromium_src-49c44c010634e2270ff761ebda343795b5f050d0.tar.gz chromium_src-49c44c010634e2270ff761ebda343795b5f050d0.tar.bz2 |
Rename some methods in paint-related platform code to avoid problems in Chromium style.
Review URL: https://codereview.chromium.org/1738263002
Cr-Commit-Position: refs/heads/master@{#378092}
32 files changed, 49 insertions, 52 deletions
diff --git a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp index 0d4795c..dd93783 100644 --- a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp +++ b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp @@ -308,7 +308,7 @@ void InspectorLayerTreeAgent::compositingReasons(ErrorString* errorString, const const GraphicsLayer* graphicsLayer = layerById(errorString, layerId); if (!graphicsLayer) return; - CompositingReasons reasonsBitmask = graphicsLayer->compositingReasons(); + CompositingReasons reasonsBitmask = graphicsLayer->getCompositingReasons(); *reasonStrings = Array<String>::create(); for (size_t i = 0; i < kNumberOfCompositingReasons; ++i) { if (!(reasonsBitmask & kCompositingReasonStringMap[i].reason)) diff --git a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp index 421dc80..9636bd1 100644 --- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp +++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp @@ -629,7 +629,7 @@ static void adjustStepToDecorationLength(float& step, float& controlPointDistanc */ static void strokeWavyTextDecoration(GraphicsContext& context, FloatPoint p1, FloatPoint p2, float strokeThickness) { - context.adjustLineToPixelBoundaries(p1, p2, strokeThickness, context.strokeStyle()); + context.adjustLineToPixelBoundaries(p1, p2, strokeThickness, context.getStrokeStyle()); Path path; path.moveTo(p1); diff --git a/third_party/WebKit/Source/core/paint/LayerClipRecorderTest.cpp b/third_party/WebKit/Source/core/paint/LayerClipRecorderTest.cpp index a59a43f..51cdc06 100644 --- a/third_party/WebKit/Source/core/paint/LayerClipRecorderTest.cpp +++ b/third_party/WebKit/Source/core/paint/LayerClipRecorderTest.cpp @@ -67,9 +67,9 @@ TEST_F(LayerClipRecorderTest, Single) drawRectInClip(context, layoutView(), PaintPhaseForeground, bound); rootPaintController().commitNewDisplayItems(); EXPECT_EQ((size_t)3, rootPaintController().displayItemList().size()); - EXPECT_TRUE(DisplayItem::isClipType(rootPaintController().displayItemList()[0].type())); - EXPECT_TRUE(DisplayItem::isDrawingType(rootPaintController().displayItemList()[1].type())); - EXPECT_TRUE(DisplayItem::isEndClipType(rootPaintController().displayItemList()[2].type())); + EXPECT_TRUE(DisplayItem::isClipType(rootPaintController().displayItemList()[0].getType())); + EXPECT_TRUE(DisplayItem::isDrawingType(rootPaintController().displayItemList()[1].getType())); + EXPECT_TRUE(DisplayItem::isEndClipType(rootPaintController().displayItemList()[2].getType())); } TEST_F(LayerClipRecorderTest, Empty) diff --git a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp index 97a574b..5c3fb5d 100644 --- a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp +++ b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp @@ -342,7 +342,7 @@ void ObjectPainter::drawDashedOrDottedBoxSide(GraphicsContext& graphicsContext, ASSERT(thickness > 0); bool wasAntialiased = graphicsContext.shouldAntialias(); - StrokeStyle oldStrokeStyle = graphicsContext.strokeStyle(); + StrokeStyle oldStrokeStyle = graphicsContext.getStrokeStyle(); graphicsContext.setShouldAntialias(antialias); graphicsContext.setStrokeColor(color); graphicsContext.setStrokeThickness(thickness); @@ -373,7 +373,7 @@ void ObjectPainter::drawDoubleBoxSide(GraphicsContext& graphicsContext, int x1, ASSERT(thirdOfThickness > 0); if (!adjacentWidth1 && !adjacentWidth2) { - StrokeStyle oldStrokeStyle = graphicsContext.strokeStyle(); + StrokeStyle oldStrokeStyle = graphicsContext.getStrokeStyle(); graphicsContext.setStrokeStyle(NoStroke); graphicsContext.setFillColor(color); diff --git a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h index a5b7121..cee7dab 100644 --- a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h +++ b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h @@ -86,7 +86,7 @@ protected: bool displayItemListContains(const DisplayItemList& displayItemList, DisplayItemClient& client, DisplayItem::Type type) { for (auto& item : displayItemList) { - if (item.client() == client && item.type() == type) + if (item.client() == client && item.getType() == type) return true; } return false; @@ -140,7 +140,7 @@ public: for (size_t index = 0; index < std::min<size_t>(actual.size(), expectedSize); index++) { \ TRACE_DISPLAY_ITEMS(index, expected[index], actual[index]); \ EXPECT_EQ(expected[index].client(), actual[index].client()); \ - EXPECT_EQ(expected[index].type(), actual[index].type()); \ + EXPECT_EQ(expected[index].getType(), actual[index].getType()); \ } \ } while (false); diff --git a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.h b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.h index 9ca13f93..4b9f887 100644 --- a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.h +++ b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.h @@ -40,7 +40,7 @@ public: FloatRect determineAbsolutePaintRect(const FloatRect& requestedRect) override; - FilterEffectType filterEffectType() const override { return FilterEffectTypeImage; } + FilterEffectType getFilterEffectType() const override { return FilterEffectTypeImage; } // feImage does not perform color interpolation of any kind, so doesn't // depend on the value of color-interpolation-filters. diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp index 35d922a..98ebcb8 100644 --- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp +++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp @@ -483,7 +483,7 @@ void GraphicsContext::drawLine(const IntPoint& point1, const IntPoint& point2) return; ASSERT(m_canvas); - StrokeStyle penStyle = strokeStyle(); + StrokeStyle penStyle = getStrokeStyle(); if (penStyle == NoStroke) return; @@ -499,7 +499,7 @@ void GraphicsContext::drawLine(const IntPoint& point1, const IntPoint& point2) int length = SkScalarRoundToInt(disp.width() + disp.height()); SkPaint paint(immutableState()->strokePaint(length)); - if (strokeStyle() == DottedStroke || strokeStyle() == DashedStroke) { + if (getStrokeStyle() == DottedStroke || getStrokeStyle() == DashedStroke) { // Do a rect fill of our endpoints. This ensures we always have the // appearance of being a border. We then draw the actual dotted/dashed line. SkRect r1, r2; @@ -662,7 +662,7 @@ void GraphicsContext::drawLineForText(const FloatPoint& pt, float width, bool pr return; SkPaint paint; - switch (strokeStyle()) { + switch (getStrokeStyle()) { case NoStroke: case SolidStroke: case DoubleStroke: @@ -738,7 +738,7 @@ void GraphicsContext::drawTextPasses(const DrawTextFunc& drawText) drawText(immutableState()->fillPaint()); } - if ((modeFlags & TextModeStroke) && strokeStyle() != NoStroke && strokeThickness() > 0) { + if ((modeFlags & TextModeStroke) && getStrokeStyle() != NoStroke && strokeThickness() > 0) { SkPaint paintForStroking(immutableState()->strokePaint()); if (modeFlags & TextModeFill) { paintForStroking.setLooper(0); // shadow was already applied during fill pass diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.h b/third_party/WebKit/Source/platform/graphics/GraphicsContext.h index 899200b..c819176 100644 --- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.h +++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.h @@ -92,7 +92,7 @@ public: float strokeThickness() const { return immutableState()->strokeData().thickness(); } void setStrokeThickness(float thickness) { mutableState()->setStrokeThickness(thickness); } - StrokeStyle strokeStyle() const { return immutableState()->strokeData().style(); } + StrokeStyle getStrokeStyle() const { return immutableState()->strokeData().style(); } void setStrokeStyle(StrokeStyle style) { mutableState()->setStrokeStyle(style); } Color strokeColor() const { return immutableState()->strokeColor(); } @@ -118,7 +118,7 @@ public: TextDrawingModeFlags textDrawingMode() const { return immutableState()->textDrawingMode(); } void setImageInterpolationQuality(InterpolationQuality quality) { mutableState()->setInterpolationQuality(quality); } - InterpolationQuality imageInterpolationQuality() const { return immutableState()->interpolationQuality(); } + InterpolationQuality imageInterpolationQuality() const { return immutableState()->getInterpolationQuality(); } // Specify the device scale factor which may change the way document markers // and fonts are rendered. diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContextState.h b/third_party/WebKit/Source/platform/graphics/GraphicsContextState.h index 42edcae..d4c9418 100644 --- a/third_party/WebKit/Source/platform/graphics/GraphicsContextState.h +++ b/third_party/WebKit/Source/platform/graphics/GraphicsContextState.h @@ -103,7 +103,7 @@ public: void setColorFilter(PassRefPtr<SkColorFilter>); // Image interpolation control. - InterpolationQuality interpolationQuality() const { return m_interpolationQuality; } + InterpolationQuality getInterpolationQuality() const { return m_interpolationQuality; } void setInterpolationQuality(InterpolationQuality); bool shouldAntialias() const { return m_shouldAntialias; } diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp index 75065b1..a4eeb81 100644 --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp @@ -365,7 +365,7 @@ void GraphicsLayer::notifyFirstPaintToClient() if (!m_painted) { DisplayItemList& itemList = m_paintController->newDisplayItemList(); for (DisplayItem& item : itemList) { - DisplayItem::Type type = item.type(); + DisplayItem::Type type = item.getType(); if (DisplayItem::isDrawingType(type) && type != DisplayItem::DocumentBackground && type != DisplayItem::DebugRedFill && static_cast<const DrawingDisplayItem&>(item).picture()) { m_painted = true; m_client->notifyFirstPaint(); @@ -779,7 +779,7 @@ PassRefPtr<JSONObject> GraphicsLayer::layerTreeAsJSON(LayerTreeFlags flags, Rend bool debug = flags & LayerTreeIncludesDebugInfo; RefPtr<JSONArray> compositingReasonsJSON = JSONArray::create(); for (size_t i = 0; i < kNumberOfCompositingReasons; ++i) { - if (m_debugInfo.compositingReasons() & kCompositingReasonStringMap[i].reason) + if (m_debugInfo.getCompositingReasons() & kCompositingReasonStringMap[i].reason) compositingReasonsJSON->pushString(debug ? kCompositingReasonStringMap[i].description : kCompositingReasonStringMap[i].shortName); } json->setArray("compositingReasons", compositingReasonsJSON); diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h index a565bc6..0b9b9ac 100644 --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h @@ -85,7 +85,7 @@ public: GraphicsLayerDebugInfo& debugInfo(); void setCompositingReasons(CompositingReasons); - CompositingReasons compositingReasons() const { return m_debugInfo.compositingReasons(); } + CompositingReasons getCompositingReasons() const { return m_debugInfo.getCompositingReasons(); } void setSquashingDisallowedReasons(SquashingDisallowedReasons); void setOwnerNodeId(int); diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h b/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h index fd79f68..49a4b83 100644 --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h @@ -57,7 +57,7 @@ public: scoped_refptr<base::trace_event::TracedValue> asTracedValue() const; - CompositingReasons compositingReasons() const { return m_compositingReasons; } + CompositingReasons getCompositingReasons() const { return m_compositingReasons; } void setCompositingReasons(CompositingReasons reasons) { m_compositingReasons = reasons; } SquashingDisallowedReasons squashingDisallowedReasons() const { return m_squashingDisallowedReasons; } diff --git a/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h b/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h index 364b979..17988d9 100644 --- a/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h +++ b/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h @@ -84,7 +84,7 @@ public: // May return nullptr if the surface is GPU-backed and the GPU context was lost. virtual PassRefPtr<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason) = 0; - OpacityMode opacityMode() const { return m_opacityMode; } + OpacityMode getOpacityMode() const { return m_opacityMode; } const IntSize& size() const { return m_size; } void notifyIsValidChanged(bool isValid) const; diff --git a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp index afc2ba9..406f0cb 100644 --- a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp +++ b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp @@ -78,7 +78,7 @@ void RecordingImageBufferSurface::fallBackToRasterCanvas(FallbackReason reason) DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, canvasFallbackHistogram, new EnumerationHistogram("Canvas.DisplayListFallbackReason", FallbackReasonCount)); canvasFallbackHistogram.count(reason); - m_fallbackSurface = m_fallbackFactory->createSurface(size(), opacityMode()); + m_fallbackSurface = m_fallbackFactory->createSurface(size(), getOpacityMode()); m_fallbackSurface->setImageBuffer(m_imageBuffer); if (m_previousFrame) { diff --git a/third_party/WebKit/Source/platform/graphics/StrokeData.h b/third_party/WebKit/Source/platform/graphics/StrokeData.h index ae9043d..2dfedd85 100644 --- a/third_party/WebKit/Source/platform/graphics/StrokeData.h +++ b/third_party/WebKit/Source/platform/graphics/StrokeData.h @@ -62,10 +62,8 @@ public: float thickness() const { return m_thickness; } void setThickness(float thickness) { m_thickness = thickness; } - LineCap lineCap() const { return (LineCap)m_lineCap; } void setLineCap(LineCap cap) { m_lineCap = (SkPaint::Cap)cap; } - LineJoin lineJoin() const { return (LineJoin)m_lineJoin; } void setLineJoin(LineJoin join) { m_lineJoin = (SkPaint::Join)join; } float miterLimit() const { return m_miterLimit; } diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp index 061be13..4f89ff8 100644 --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp @@ -79,7 +79,7 @@ namespace { static void appendDisplayItemToCcDisplayItemList(const DisplayItem& displayItem, cc::DisplayItemList* list) { - if (DisplayItem::isDrawingType(displayItem.type())) { + if (DisplayItem::isDrawingType(displayItem.getType())) { const SkPicture* picture = static_cast<const DrawingDisplayItem&>(displayItem).picture(); if (!picture) return; diff --git a/third_party/WebKit/Source/platform/graphics/filters/FETile.h b/third_party/WebKit/Source/platform/graphics/filters/FETile.h index 69a29a0..22d6de1 100644 --- a/third_party/WebKit/Source/platform/graphics/filters/FETile.h +++ b/third_party/WebKit/Source/platform/graphics/filters/FETile.h @@ -33,7 +33,7 @@ public: FloatRect mapPaintRect(const FloatRect&, bool forward = true) final; - FilterEffectType filterEffectType() const override { return FilterEffectTypeTile; } + FilterEffectType getFilterEffectType() const override { return FilterEffectTypeTile; } TextStream& externalRepresentation(TextStream&, int indention) const override; diff --git a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp index e3f5b93..344dd0c 100644 --- a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp +++ b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp @@ -164,7 +164,7 @@ FloatRect FilterEffect::determineFilterPrimitiveSubregion(DetermineSubregionFlag } // After calling determineFilterPrimitiveSubregion on the target effect, reset the subregion again for <feTile>. - if (filterEffectType() == FilterEffectTypeTile) + if (getFilterEffectType() == FilterEffectTypeTile) subregion = filter->filterRegion(); if (flags & MapRectForward) { @@ -208,7 +208,7 @@ PassRefPtr<SkImageFilter> FilterEffect::createTransparentBlack(SkiaImageFilterBu bool FilterEffect::hasConnectedInput() const { for (unsigned i = 0; i < m_inputEffects.size(); i++) { - if (m_inputEffects[i] && m_inputEffects[i]->filterEffectType() != FilterEffectTypeSourceInput) { + if (m_inputEffects[i] && m_inputEffects[i]->getFilterEffectType() != FilterEffectTypeSourceInput) { return true; } } diff --git a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h index eeb0e7d1..568c25f 100644 --- a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h +++ b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h @@ -103,7 +103,7 @@ public: } FloatRect mapRectRecursive(const FloatRect&); - virtual FilterEffectType filterEffectType() const { return FilterEffectTypeUnknown; } + virtual FilterEffectType getFilterEffectType() const { return FilterEffectTypeUnknown; } virtual TextStream& externalRepresentation(TextStream&, int indention = 0) const; diff --git a/third_party/WebKit/Source/platform/graphics/filters/PaintFilterEffect.h b/third_party/WebKit/Source/platform/graphics/filters/PaintFilterEffect.h index ddfaaa4..d972c4b 100644 --- a/third_party/WebKit/Source/platform/graphics/filters/PaintFilterEffect.h +++ b/third_party/WebKit/Source/platform/graphics/filters/PaintFilterEffect.h @@ -15,7 +15,7 @@ public: static PassRefPtrWillBeRawPtr<PaintFilterEffect> create(Filter*, const SkPaint&); ~PaintFilterEffect() override; - FilterEffectType filterEffectType() const override { return FilterEffectTypeSourceInput; } + FilterEffectType getFilterEffectType() const override { return FilterEffectTypeSourceInput; } TextStream& externalRepresentation(TextStream&, int indention) const override; PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder&) override; diff --git a/third_party/WebKit/Source/platform/graphics/filters/SourceAlpha.h b/third_party/WebKit/Source/platform/graphics/filters/SourceAlpha.h index 96961e9..8537da5 100644 --- a/third_party/WebKit/Source/platform/graphics/filters/SourceAlpha.h +++ b/third_party/WebKit/Source/platform/graphics/filters/SourceAlpha.h @@ -31,7 +31,7 @@ public: FloatRect determineAbsolutePaintRect(const FloatRect& requestedRect) override; - FilterEffectType filterEffectType() const override { return FilterEffectTypeSourceInput; } + FilterEffectType getFilterEffectType() const override { return FilterEffectTypeSourceInput; } TextStream& externalRepresentation(TextStream&, int indention) const override; PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder&) override; diff --git a/third_party/WebKit/Source/platform/graphics/filters/SourceGraphic.h b/third_party/WebKit/Source/platform/graphics/filters/SourceGraphic.h index c03a1a2..1add9e1 100644 --- a/third_party/WebKit/Source/platform/graphics/filters/SourceGraphic.h +++ b/third_party/WebKit/Source/platform/graphics/filters/SourceGraphic.h @@ -36,7 +36,7 @@ public: FloatRect determineAbsolutePaintRect(const FloatRect& requestedRect) override; - FilterEffectType filterEffectType() const override { return FilterEffectTypeSourceInput; } + FilterEffectType getFilterEffectType() const override { return FilterEffectTypeSourceInput; } TextStream& externalRepresentation(TextStream&, int indention) const override; PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder&) override; diff --git a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.h b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.h index 5f17e62..378be34 100644 --- a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.h +++ b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.h @@ -137,7 +137,6 @@ public: DataFormat imageSourceFormat() { return m_imageSourceFormat; } AlphaOp imageAlphaOp() { return m_alphaOp; } unsigned imageSourceUnpackAlignment() { return m_imageSourceUnpackAlignment; } - ImageHtmlDomSource imageHtmlDomSource() { return m_imageHtmlDomSource; } private: // Extract the image and keeps track of its status, such as width, height, Source Alignment, // format and AlphaOp etc. This needs to lock the resources or relevant data if needed. diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.cpp b/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.cpp index 780d954..775c7a3 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.cpp +++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.cpp @@ -234,7 +234,7 @@ void DisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) stringBuilder.append(clientDebugString()); } stringBuilder.append("\", type: \""); - stringBuilder.append(typeAsDebugString(type())); + stringBuilder.append(typeAsDebugString(getType())); stringBuilder.append('"'); if (m_skippedCache) stringBuilder.append(", skippedCache: true"); diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h b/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h index 1756042..fc44e8e 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h +++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h @@ -248,7 +248,7 @@ public: virtual void replay(GraphicsContext&) const { } const DisplayItemClient& client() const { ASSERT(m_client); return *m_client; } - Type type() const { return m_type; } + Type getType() const { return m_type; } void setScope(unsigned scope) { m_scope = scope; } unsigned scope() { return m_scope; } @@ -268,7 +268,7 @@ public: // See comments of enum Type for usage of the following macros. #define DEFINE_CATEGORY_METHODS(Category) \ static bool is##Category##Type(Type type) { return type >= Category##First && type <= Category##Last; } \ - bool is##Category() const { return is##Category##Type(type()); } + bool is##Category() const { return is##Category##Type(getType()); } #define DEFINE_CONVERSION_METHODS(Category1, category1, Category2, category2) \ static Type category1##TypeTo##Category2##Type(Type type) \ diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp index 97d361d..b630917 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp +++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp @@ -75,7 +75,7 @@ bool DrawingDisplayItem::equals(const DisplayItem& other) const if (!picture || !otherPicture) return false; - switch (underInvalidationCheckingMode()) { + switch (getUnderInvalidationCheckingMode()) { case DrawingDisplayItem::CheckPicture: { if (picture->approximateOpCount() != otherPicture->approximateOpCount()) return false; diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h index 825d58b..94a5238 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h +++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h @@ -50,7 +50,7 @@ public: bool knownToBeOpaque() const { ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); return m_knownToBeOpaque; } #if ENABLE(ASSERT) - UnderInvalidationCheckingMode underInvalidationCheckingMode() const { return m_underInvalidationCheckingMode; } + UnderInvalidationCheckingMode getUnderInvalidationCheckingMode() const { return m_underInvalidationCheckingMode; } bool equals(const DisplayItem& other) const final; #endif diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifactToSkCanvas.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifactToSkCanvas.cpp index 18ca925..a04abf5 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifactToSkCanvas.cpp +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifactToSkCanvas.cpp @@ -23,7 +23,7 @@ namespace { void paintDisplayItemToSkCanvas(const DisplayItem& displayItem, SkCanvas* canvas) { - DisplayItem::Type type = displayItem.type(); + DisplayItem::Type type = displayItem.getType(); if (DisplayItem::isDrawingType(type)) { canvas->drawPicture(static_cast<const DrawingDisplayItem&>(displayItem).picture()); diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp index f14c0f1..0ef0044 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp @@ -65,8 +65,8 @@ void PaintController::processNewItem(DisplayItem& displayItem) // Verify noop begin/end pairs have been removed. if (m_newDisplayItemList.size() >= 2 && displayItem.isEnd()) { const auto& beginDisplayItem = m_newDisplayItemList[m_newDisplayItemList.size() - 2]; - if (beginDisplayItem.isBegin() && beginDisplayItem.type() != DisplayItem::Subsequence && !beginDisplayItem.drawsContent()) - ASSERT(!displayItem.isEndAndPairedWith(beginDisplayItem.type())); + if (beginDisplayItem.isBegin() && beginDisplayItem.getType() != DisplayItem::Subsequence && !beginDisplayItem.drawsContent()) + ASSERT(!displayItem.isEndAndPairedWith(beginDisplayItem.getType())); } #endif @@ -242,7 +242,7 @@ DisplayItemList::iterator PaintController::findOutOfOrderCachedItemForward(const void PaintController::copyCachedSubsequence(const DisplayItemList& currentList, DisplayItemList::iterator& currentIt, DisplayItemList& updatedList) { - ASSERT(currentIt->type() == DisplayItem::Subsequence); + ASSERT(currentIt->getType() == DisplayItem::Subsequence); ASSERT(!currentIt->scope()); DisplayItem::Id endSubsequenceId(currentIt->client(), DisplayItem::EndSubsequence, 0); do { @@ -335,7 +335,7 @@ void PaintController::commitNewDisplayItemsInternal(const LayoutSize& offsetFrom for (DisplayItemList::iterator newIt = m_newDisplayItemList.begin(); newIt != m_newDisplayItemList.end(); ++newIt) { const DisplayItem& newDisplayItem = *newIt; const DisplayItem::Id newDisplayItemId = newDisplayItem.nonCachedId(); - bool newDisplayItemHasCachedType = newDisplayItem.type() != newDisplayItemId.type; + bool newDisplayItemHasCachedType = newDisplayItem.getType() != newDisplayItemId.type; bool isSynchronized = currentIt != currentEnd && newDisplayItemId.matches(*currentIt); @@ -367,9 +367,9 @@ void PaintController::commitNewDisplayItemsInternal(const LayoutSize& offsetFrom updatedList.appendByMoving(*currentIt, m_currentPaintArtifact.displayItemList().visualRect(currentIt - m_currentPaintArtifact.displayItemList().begin())); ++currentIt; } else { - ASSERT(newDisplayItem.type() == DisplayItem::CachedSubsequence); + ASSERT(newDisplayItem.getType() == DisplayItem::CachedSubsequence); copyCachedSubsequence(m_currentPaintArtifact.displayItemList(), currentIt, updatedList); - ASSERT(updatedList.last().type() == DisplayItem::EndSubsequence); + ASSERT(updatedList.last().getType() == DisplayItem::EndSubsequence); } } else { ASSERT(!newDisplayItem.isDrawing() @@ -452,16 +452,16 @@ void PaintController::checkUnderInvalidation(DisplayItemList::iterator& newIt, D ASSERT(newIt->isCached()); // When under-invalidation-checking is enabled, the forced painting is following the cached display item. - DisplayItem::Type nextItemType = DisplayItem::nonCachedType(newIt->type()); + DisplayItem::Type nextItemType = DisplayItem::nonCachedType(newIt->getType()); ++newIt; - ASSERT(newIt->type() == nextItemType); + ASSERT(newIt->getType() == nextItemType); if (newIt->isDrawing()) { checkCachedDisplayItemIsUnchanged("", *newIt, *currentIt); return; } - ASSERT(newIt->type() == DisplayItem::Subsequence); + ASSERT(newIt->getType() == DisplayItem::Subsequence); #ifndef NDEBUG CString messagePrefix = String::format("(In CachedSubsequence of %s)", newIt->clientDebugString().utf8().data()).utf8(); diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp index 0e616f6..fd24cc3 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp @@ -83,7 +83,7 @@ public: for (size_t index = 0; index < std::min<size_t>(actual.size(), expectedSize); index++) { \ TRACE_DISPLAY_ITEMS(index, expected[index], actual[index]); \ EXPECT_EQ(expected[index].client(), actual[index].client()); \ - EXPECT_EQ(expected[index].type(), actual[index].type()); \ + EXPECT_EQ(expected[index].getType(), actual[index].getType()); \ } \ } while (false); diff --git a/third_party/WebKit/Source/platform/graphics/paint/SubsequenceDisplayItem.h b/third_party/WebKit/Source/platform/graphics/paint/SubsequenceDisplayItem.h index 1d56b3c..e3e9ad5 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/SubsequenceDisplayItem.h +++ b/third_party/WebKit/Source/platform/graphics/paint/SubsequenceDisplayItem.h @@ -27,7 +27,7 @@ public: #if ENABLE(ASSERT) bool isEndAndPairedWith(DisplayItem::Type otherType) const final { - return type() == EndSubsequence && otherType == Subsequence; + return getType() == EndSubsequence && otherType == Subsequence; } #endif }; diff --git a/third_party/WebKit/Source/platform/graphics/paint/Transform3DDisplayItem.h b/third_party/WebKit/Source/platform/graphics/paint/Transform3DDisplayItem.h index d480b5c..cb028bc 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/Transform3DDisplayItem.h +++ b/third_party/WebKit/Source/platform/graphics/paint/Transform3DDisplayItem.h @@ -65,7 +65,7 @@ private: #if ENABLE(ASSERT) bool isEndAndPairedWith(DisplayItem::Type otherType) const final { - return DisplayItem::transform3DTypeToEndTransform3DType(otherType) == type(); + return DisplayItem::transform3DTypeToEndTransform3DType(otherType) == getType(); } #endif }; |