Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h

Issue 2903053002: Removing canvas rendering mode switching feature (Closed)
Patch Set: fix test failure Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // CanvasRenderingContext 187 // CanvasRenderingContext
188 188
189 bool StateHasFilter() final; 189 bool StateHasFilter() final;
190 sk_sp<SkImageFilter> StateGetFilter() final; 190 sk_sp<SkImageFilter> StateGetFilter() final;
191 void SnapshotStateForFilter() final; 191 void SnapshotStateForFilter() final;
192 192
193 void ValidateStateStack() const final; 193 void ValidateStateStack() const final;
194 194
195 PassRefPtr<Image> GetImage(AccelerationHint, SnapshotReason) const final; 195 PassRefPtr<Image> GetImage(AccelerationHint, SnapshotReason) const final;
196 196
197 bool IsAccelerationOptimalForCanvasContent() const;
198
199 void ResetUsageTracking();
200
201 void FinalizeFrame() override { usage_counters_.num_frames_since_reset++; } 197 void FinalizeFrame() override { usage_counters_.num_frames_since_reset++; }
202 198
203 bool IsPaintable() const final { return HasImageBuffer(); } 199 bool IsPaintable() const final { return HasImageBuffer(); }
204 200
205 ColorBehavior DrawImageColorBehavior() const final; 201 ColorBehavior DrawImageColorBehavior() const final;
206 202
207 void WillDrawImage(CanvasImageSource*) const final; 203 void WillDrawImage(CanvasImageSource*) const final;
208 204
209 protected: 205 protected:
210 virtual void NeedsFinalizeFrame() { 206 virtual void NeedsFinalizeFrame() {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 273
278 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, 274 DEFINE_TYPE_CASTS(CanvasRenderingContext2D,
279 CanvasRenderingContext, 275 CanvasRenderingContext,
280 context, 276 context,
281 context->Is2d() && context->host(), 277 context->Is2d() && context->host(),
282 context.Is2d() && context.host()); 278 context.Is2d() && context.host());
283 279
284 } // namespace blink 280 } // namespace blink
285 281
286 #endif // CanvasRenderingContext2D_h 282 #endif // CanvasRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698