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

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

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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 if (m_contextLostMode == NotLostContext) 263 if (m_contextLostMode == NotLostContext)
264 return; 264 return;
265 reset(); 265 reset();
266 m_contextLostMode = NotLostContext; 266 m_contextLostMode = NotLostContext;
267 if (contextLostRestoredEventsEnabled()) { 267 if (contextLostRestoredEventsEnabled()) {
268 Event* event(Event::create(EventTypeNames::contextrestored)); 268 Event* event(Event::create(EventTypeNames::contextrestored));
269 canvas()->dispatchEvent(event); 269 canvas()->dispatchEvent(event);
270 } 270 }
271 } 271 }
272 272
273 ColorBehavior CanvasRenderingContext2D::drawImageColorBehavior() const {
274 return CanvasRenderingContext::colorBehaviorForMediaDrawnToCanvas();
275 }
276
273 void CanvasRenderingContext2D::reset() { 277 void CanvasRenderingContext2D::reset() {
274 // This is a multiple inherritance bootstrap 278 // This is a multiple inherritance bootstrap
275 BaseRenderingContext2D::reset(); 279 BaseRenderingContext2D::reset();
276 } 280 }
277 281
278 void CanvasRenderingContext2D::restoreCanvasMatrixClipStack(SkCanvas* c) const { 282 void CanvasRenderingContext2D::restoreCanvasMatrixClipStack(SkCanvas* c) const {
279 restoreMatrixClipStack(c); 283 restoreMatrixClipStack(c);
280 } 284 }
281 285
282 bool CanvasRenderingContext2D::shouldAntialias() const { 286 bool CanvasRenderingContext2D::shouldAntialias() const {
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 } 1158 }
1155 return true; 1159 return true;
1156 } 1160 }
1157 1161
1158 void CanvasRenderingContext2D::resetUsageTracking() { 1162 void CanvasRenderingContext2D::resetUsageTracking() {
1159 UsageCounters newCounters; 1163 UsageCounters newCounters;
1160 m_usageCounters = newCounters; 1164 m_usageCounters = newCounters;
1161 } 1165 }
1162 1166
1163 } // namespace blink 1167 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698