Chromium Code Reviews| Index: Source/platform/graphics/BitmapPattern.h |
| diff --git a/LICENSE b/Source/platform/graphics/BitmapPattern.h |
| similarity index 73% |
| copy from LICENSE |
| copy to Source/platform/graphics/BitmapPattern.h |
| index 70bcb8ad118978579fa055f7ecc99604930900ce..941798cc9063804f9abf73b66bfeb491154c673b 100644 |
| --- a/LICENSE |
| +++ b/Source/platform/graphics/BitmapPattern.h |
| @@ -28,3 +28,31 @@ |
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| + |
| +#ifndef BitmapPattern_h |
| +#define BitmapPattern_h |
| + |
| +#include "platform/graphics/Pattern.h" |
| + |
| +namespace WebCore { |
| + |
| +class PLATFORM_EXPORT BitmapPattern : public Pattern { |
|
Justin Novosad
2014/07/29 14:56:51
Why is this exported?
Rémi Piotaix
2014/07/29 17:18:22
Done.
|
| +public: |
| + static PassRefPtr<Pattern> create(PassRefPtr<Image> tileImage, bool repeatX, bool repeatY) |
|
Justin Novosad
2014/07/29 14:56:52
Should return PassRefPtr<BitmapPattern>. Implicit
Rémi Piotaix
2014/07/29 17:18:22
Done.
|
| + { |
| + return adoptRef(new BitmapPattern(tileImage, repeatX, repeatY)); |
| + } |
| + |
| + virtual ~BitmapPattern() { } |
| + |
| + virtual PassRefPtr<SkShader> createShader() OVERRIDE; |
| + |
| +private: |
| + BitmapPattern(PassRefPtr<Image>, bool repeatX, bool repeatY); |
| + |
| + RefPtr<NativeImageSkia> m_tileImage; |
| +}; |
| + |
| +} // namespace |
| + |
| +#endif |