IdentityTransformOperation.h [plain text]
#ifndef IdentityTransformOperation_h
#define IdentityTransformOperation_h
#include "TransformOperation.h"
#include <wtf/Ref.h>
namespace WebCore {
class IdentityTransformOperation final : public TransformOperation {
public:
static Ref<IdentityTransformOperation> create()
{
return adoptRef(*new IdentityTransformOperation());
}
Ref<TransformOperation> clone() const override
{
return create();
}
private:
bool isIdentity() const override { return true; }
OperationType type() const override { return IDENTITY; }
bool isSameType(const TransformOperation& o) const override { return o.type() == IDENTITY; }
bool operator==(const TransformOperation& o) const override
{
return isSameType(o);
}
bool apply(TransformationMatrix&, const FloatSize&) const override
{
return false;
}
Ref<TransformOperation> blend(const TransformOperation*, double, bool = false) override
{
return *this;
}
void dump(TextStream&) const final;
IdentityTransformOperation()
{
}
};
}
SPECIALIZE_TYPE_TRAITS_TRANSFORMOPERATION(WebCore::IdentityTransformOperation, type() == WebCore::TransformOperation::IDENTITY)
#endif // IdentityTransformOperation_h