Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMasker.h

Issue 2766943002: Do-not-commit: Count layout tree memory usage
Patch Set: Rebase, add object paint property counter Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 19 matching lines...) Expand all
30 30
31 class AffineTransform; 31 class AffineTransform;
32 class GraphicsContext; 32 class GraphicsContext;
33 33
34 class LayoutSVGResourceMasker final : public LayoutSVGResourceContainer { 34 class LayoutSVGResourceMasker final : public LayoutSVGResourceContainer {
35 public: 35 public:
36 explicit LayoutSVGResourceMasker(SVGMaskElement*); 36 explicit LayoutSVGResourceMasker(SVGMaskElement*);
37 ~LayoutSVGResourceMasker() override; 37 ~LayoutSVGResourceMasker() override;
38 38
39 const char* name() const override { return "LayoutSVGResourceMasker"; } 39 const char* name() const override { return "LayoutSVGResourceMasker"; }
40 char objectSize() const override { return sizeof(this); }
41 char approximateHeapMemoryUsage() const override {
42 int memory = LayoutSVGResourceContainer::approximateHeapMemoryUsage();
43 // TODO(pdr): Include memory from m_cachedPaintRecord.
44 return memory;
45 }
40 46
41 void removeAllClientsFromCache(bool markForInvalidation = true) override; 47 void removeAllClientsFromCache(bool markForInvalidation = true) override;
42 void removeClientFromCache(LayoutObject*, 48 void removeClientFromCache(LayoutObject*,
43 bool markForInvalidation = true) override; 49 bool markForInvalidation = true) override;
44 50
45 FloatRect resourceBoundingBox(const LayoutObject*); 51 FloatRect resourceBoundingBox(const LayoutObject*);
46 52
47 SVGUnitTypes::SVGUnitType maskUnits() const { 53 SVGUnitTypes::SVGUnitType maskUnits() const {
48 return toSVGMaskElement(element()) 54 return toSVGMaskElement(element())
49 ->maskUnits() 55 ->maskUnits()
(...skipping 20 matching lines...) Expand all
70 sk_sp<const PaintRecord> m_cachedPaintRecord; 76 sk_sp<const PaintRecord> m_cachedPaintRecord;
71 FloatRect m_maskContentBoundaries; 77 FloatRect m_maskContentBoundaries;
72 }; 78 };
73 79
74 DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(LayoutSVGResourceMasker, 80 DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(LayoutSVGResourceMasker,
75 MaskerResourceType); 81 MaskerResourceType);
76 82
77 } // namespace blink 83 } // namespace blink
78 84
79 #endif 85 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698