| Index: Source/platform/graphics/BitmapPattern.h
|
| diff --git a/Source/platform/graphics/BitmapPattern.h b/Source/platform/graphics/BitmapPattern.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ffa954ef9f42042ef1069699966679011da2e164
|
| --- /dev/null
|
| +++ b/Source/platform/graphics/BitmapPattern.h
|
| @@ -0,0 +1,35 @@
|
| +// Copyright 2014 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 BitmapPattern_h
|
| +#define BitmapPattern_h
|
| +
|
| +#include "platform/graphics/Pattern.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class BitmapPattern : public BitmapBackedPattern {
|
| +public:
|
| + static PassRefPtr<BitmapPattern> create(PassRefPtr<Image> tileImage, bool repeatX, bool repeatY)
|
| + {
|
| + return adoptRef(new BitmapPattern(tileImage, repeatX, repeatY));
|
| + }
|
| +
|
| + virtual ~BitmapPattern() { }
|
| +
|
| + virtual PassRefPtr<SkShader> createShader(SkShader::ShaderLocation preferredLocation) OVERRIDE;
|
| +
|
| +protected:
|
| + virtual SkImageInfo getBitmapInfo() OVERRIDE;
|
| + virtual void drawBitmapToCanvas(SkCanvas&, SkPaint&) OVERRIDE;
|
| +
|
| +private:
|
| + BitmapPattern(PassRefPtr<Image>, bool repeatX, bool repeatY);
|
| +
|
| + RefPtr<NativeImageSkia> m_tileImage;
|
| +};
|
| +
|
| +} // namespace
|
| +
|
| +#endif
|
|
|