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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 void ApplyToFlags(PaintFlags&, const SkMatrix&); | 66 void ApplyToFlags(PaintFlags&, const SkMatrix&); |
67 | 67 |
68 bool IsRepeatX() const { return repeat_mode_ & kRepeatModeX; } | 68 bool IsRepeatX() const { return repeat_mode_ & kRepeatModeX; } |
69 bool IsRepeatY() const { return repeat_mode_ & kRepeatModeY; } | 69 bool IsRepeatY() const { return repeat_mode_ & kRepeatModeY; } |
70 bool IsRepeatXY() const { return repeat_mode_ == kRepeatModeXY; } | 70 bool IsRepeatXY() const { return repeat_mode_ == kRepeatModeXY; } |
71 | 71 |
72 virtual bool IsTextureBacked() const { return false; } | 72 virtual bool IsTextureBacked() const { return false; } |
73 | 73 |
74 protected: | 74 protected: |
75 virtual sk_sp<PaintShader> CreateShader(const SkMatrix&) = 0; | 75 virtual std::unique_ptr<PaintShader> CreateShader(const SkMatrix&) = 0; |
76 virtual bool IsLocalMatrixChanged(const SkMatrix&) const; | 76 virtual bool IsLocalMatrixChanged(const SkMatrix&) const; |
77 | 77 |
78 RepeatMode repeat_mode_; | 78 RepeatMode repeat_mode_; |
79 | 79 |
80 Pattern(RepeatMode); | 80 Pattern(RepeatMode); |
81 mutable sk_sp<PaintShader> cached_shader_; | 81 mutable std::unique_ptr<PaintShader> cached_shader_; |
82 }; | 82 }; |
83 | 83 |
84 } // namespace blink | 84 } // namespace blink |
85 | 85 |
86 #endif | 86 #endif |
OLD | NEW |