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

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

Issue 2572873002: Add ColorBehavior plumbing for 2D canvas drawImage (Closed)
Patch Set: Created 4 years 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 PassRefPtr<Image> getImage(AccelerationHint, SnapshotReason) const final; 190 PassRefPtr<Image> getImage(AccelerationHint, SnapshotReason) const final;
191 191
192 bool isAccelerationOptimalForCanvasContent() const; 192 bool isAccelerationOptimalForCanvasContent() const;
193 193
194 void resetUsageTracking(); 194 void resetUsageTracking();
195 195
196 void incrementFrameCount() { m_usageCounters.numFramesSinceReset++; } 196 void incrementFrameCount() { m_usageCounters.numFramesSinceReset++; }
197 197
198 bool isPaintable() const final { return hasImageBuffer(); } 198 bool isPaintable() const final { return hasImageBuffer(); }
199 199
200 ColorBehavior drawImageColorBehavior() const final;
201
200 private: 202 private:
201 friend class CanvasRenderingContext2DAutoRestoreSkCanvas; 203 friend class CanvasRenderingContext2DAutoRestoreSkCanvas;
202 204
203 CanvasRenderingContext2D(HTMLCanvasElement*, 205 CanvasRenderingContext2D(HTMLCanvasElement*,
204 const CanvasContextCreationAttributes& attrs, 206 const CanvasContextCreationAttributes& attrs,
205 Document&); 207 Document&);
206 208
207 void dispose(); 209 void dispose();
208 210
209 void dispatchContextLostEvent(TimerBase*); 211 void dispatchContextLostEvent(TimerBase*);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 261
260 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, 262 DEFINE_TYPE_CASTS(CanvasRenderingContext2D,
261 CanvasRenderingContext, 263 CanvasRenderingContext,
262 context, 264 context,
263 context->is2d() && context->canvas(), 265 context->is2d() && context->canvas(),
264 context.is2d() && context.canvas()); 266 context.is2d() && context.canvas());
265 267
266 } // namespace blink 268 } // namespace blink
267 269
268 #endif // CanvasRenderingContext2D_h 270 #endif // CanvasRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698