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

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

Issue 2802353002: getImageData now finalizesFrame and disableAcceleration updates composit (Closed)
Patch Set: merge Created 3 years, 8 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void ResetUsageTracking(); 193 void ResetUsageTracking();
194 194
195 void FinalizeFrame() override { usage_counters_.num_frames_since_reset++; } 195 void FinalizeFrame() override { usage_counters_.num_frames_since_reset++; }
196 196
197 bool IsPaintable() const final { return HasImageBuffer(); } 197 bool IsPaintable() const final { return HasImageBuffer(); }
198 198
199 ColorBehavior DrawImageColorBehavior() const final; 199 ColorBehavior DrawImageColorBehavior() const final;
200 200
201 void WillDrawImage(CanvasImageSource*) const final; 201 void WillDrawImage(CanvasImageSource*) const final;
202 202
203 protected:
204 virtual void NeedsFinalizeFrame() {
205 CanvasRenderingContext::NeedsFinalizeFrame();
206 }
207
203 private: 208 private:
204 friend class CanvasRenderingContext2DAutoRestoreSkCanvas; 209 friend class CanvasRenderingContext2DAutoRestoreSkCanvas;
205 210
206 CanvasRenderingContext2D(HTMLCanvasElement*, 211 CanvasRenderingContext2D(HTMLCanvasElement*,
207 const CanvasContextCreationAttributes& attrs, 212 const CanvasContextCreationAttributes& attrs,
208 Document&); 213 Document&);
209 214
210 void DispatchContextLostEvent(TimerBase*); 215 void DispatchContextLostEvent(TimerBase*);
211 void DispatchContextRestoredEvent(TimerBase*); 216 void DispatchContextRestoredEvent(TimerBase*);
212 void TryRestoreContextEvent(TimerBase*); 217 void TryRestoreContextEvent(TimerBase*);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 266
262 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, 267 DEFINE_TYPE_CASTS(CanvasRenderingContext2D,
263 CanvasRenderingContext, 268 CanvasRenderingContext,
264 context, 269 context,
265 context->Is2d() && context->canvas(), 270 context->Is2d() && context->canvas(),
266 context.Is2d() && context.canvas()); 271 context.Is2d() && context.canvas());
267 272
268 } // namespace blink 273 } // namespace blink
269 274
270 #endif // CanvasRenderingContext2D_h 275 #endif // CanvasRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698