OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 3 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
4 * Copyright (C) 2007-2008 Torch Mobile, Inc. | 4 * Copyright (C) 2007-2008 Torch Mobile, Inc. |
5 * Copyright (C) 2013 Google, Inc. All rights reserved. | 5 * Copyright (C) 2013 Google, Inc. All rights reserved. |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 void ApplyToFlags(PaintFlags&, const SkMatrix&); | 65 void ApplyToFlags(PaintFlags&, const SkMatrix&); |
66 | 66 |
67 bool IsRepeatX() const { return repeat_mode_ & kRepeatModeX; } | 67 bool IsRepeatX() const { return repeat_mode_ & kRepeatModeX; } |
68 bool IsRepeatY() const { return repeat_mode_ & kRepeatModeY; } | 68 bool IsRepeatY() const { return repeat_mode_ & kRepeatModeY; } |
69 bool IsRepeatXY() const { return repeat_mode_ == kRepeatModeXY; } | 69 bool IsRepeatXY() const { return repeat_mode_ == kRepeatModeXY; } |
70 | 70 |
71 virtual bool IsTextureBacked() const { return false; } | 71 virtual bool IsTextureBacked() const { return false; } |
72 | 72 |
73 protected: | 73 protected: |
74 virtual sk_sp<PaintShader> CreateShader(const SkMatrix&) = 0; | 74 virtual std::unique_ptr<PaintShader> CreateShader(const SkMatrix&) = 0; |
75 virtual bool IsLocalMatrixChanged(const SkMatrix&) const; | 75 virtual bool IsLocalMatrixChanged(const SkMatrix&) const; |
76 | 76 |
77 RepeatMode repeat_mode_; | 77 RepeatMode repeat_mode_; |
78 | 78 |
79 Pattern(RepeatMode); | 79 Pattern(RepeatMode); |
80 mutable sk_sp<PaintShader> cached_shader_; | 80 mutable std::unique_ptr<PaintShader> cached_shader_; |
81 }; | 81 }; |
82 | 82 |
83 } // namespace blink | 83 } // namespace blink |
84 | 84 |
85 #endif | 85 #endif |
OLD | NEW |