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());
}
virtual Ref<TransformOperation> clone() const override
{
return create();
}
private:
virtual bool isIdentity() const override { return true; }
virtual OperationType type() const override { return IDENTITY; }
virtual bool isSameType(const TransformOperation& o) const override { return o.type() == IDENTITY; }
virtual bool operator==(const TransformOperation& o) const override
{
return isSameType(o);
}
virtual bool apply(TransformationMatrix&, const FloatSize&) const override
{
return false;
}
virtual Ref<TransformOperation> blend(const TransformOperation*, double, bool = false) override
{
return *this;
}
IdentityTransformOperation()
{
}
};
}
SPECIALIZE_TYPE_TRAITS_TRANSFORMOPERATION(WebCore::IdentityTransformOperation, type() == WebCore::TransformOperation::IDENTITY)
#endif // IdentityTransformOperation_h