blob: 1b5a5876982f4f8c6887d641341f5a39505b5bef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_SVG_SVG_RESOURCE_CLIENT_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_SVG_SVG_RESOURCE_CLIENT_H_
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
namespace blink {
class LayoutSVGResourceContainer;
class QualifiedName;
class SVGFilterPrimitiveStandardAttributes;
typedef unsigned InvalidationModeMask;
class CORE_EXPORT SVGResourceClient : public GarbageCollectedMixin {
public:
virtual ~SVGResourceClient() = default;
// When adding modes, make sure we don't overflow
// |LayoutSVGResourceContainer::completed_invalidation_mask_|.
enum InvalidationMode {
kLayoutInvalidation = 1 << 0,
kBoundariesInvalidation = 1 << 1,
kPaintInvalidation = 1 << 2,
};
virtual void ResourceContentChanged(InvalidationModeMask) = 0;
virtual void ResourceElementChanged() = 0;
virtual void ResourceDestroyed(LayoutSVGResourceContainer*) {}
virtual void FilterPrimitiveChanged(
SVGFilterPrimitiveStandardAttributes& primitive,
const QualifiedName& attribute) {
ResourceContentChanged(kPaintInvalidation);
}
protected:
SVGResourceClient() = default;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_SVG_SVG_RESOURCE_CLIENT_H_
|