OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 PassRefPtr<Image> GetImage(AccelerationHint, SnapshotReason) const final; | 195 PassRefPtr<Image> GetImage(AccelerationHint, SnapshotReason) const final; |
196 | 196 |
197 bool IsAccelerationOptimalForCanvasContent() const; | 197 bool IsAccelerationOptimalForCanvasContent() const; |
198 | 198 |
199 void ResetUsageTracking(); | 199 void ResetUsageTracking(); |
200 | 200 |
201 void FinalizeFrame() override { usage_counters_.num_frames_since_reset++; } | 201 void FinalizeFrame() override { usage_counters_.num_frames_since_reset++; } |
202 | 202 |
203 bool IsPaintable() const final { return HasImageBuffer(); } | 203 bool IsPaintable() const final { return HasImageBuffer(); } |
204 | 204 |
205 ColorBehavior DrawImageColorBehavior() const final; | |
206 | |
207 void WillDrawImage(CanvasImageSource*) const final; | 205 void WillDrawImage(CanvasImageSource*) const final; |
208 | 206 |
209 protected: | 207 protected: |
210 virtual void NeedsFinalizeFrame() { | 208 virtual void NeedsFinalizeFrame() { |
211 CanvasRenderingContext::NeedsFinalizeFrame(); | 209 CanvasRenderingContext::NeedsFinalizeFrame(); |
212 } | 210 } |
213 | 211 |
214 private: | 212 private: |
215 friend class CanvasRenderingContext2DAutoRestoreSkCanvas; | 213 friend class CanvasRenderingContext2DAutoRestoreSkCanvas; |
216 | 214 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 275 |
278 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, | 276 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, |
279 CanvasRenderingContext, | 277 CanvasRenderingContext, |
280 context, | 278 context, |
281 context->Is2d() && context->host(), | 279 context->Is2d() && context->host(), |
282 context.Is2d() && context.host()); | 280 context.Is2d() && context.host()); |
283 | 281 |
284 } // namespace blink | 282 } // namespace blink |
285 | 283 |
286 #endif // CanvasRenderingContext2D_h | 284 #endif // CanvasRenderingContext2D_h |
OLD | NEW |