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

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 840733004: Replace setCompositeOperation(CompositeOperator, WebBlendMode) with setCompositeOperation(SkXfermod… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rename compositeOperationDeprecated Created 5 years, 11 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
« no previous file with comments | « Source/core/html/HTMLVideoElement.cpp ('k') | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
10 * 10 *
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 c->translate(dstRect.x(), dstRect.y()); 1445 c->translate(dstRect.x(), dstRect.y());
1446 c->scale(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.heigh t()); 1446 c->scale(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.heigh t());
1447 c->translate(-srcRect.x(), -srcRect.y()); 1447 c->translate(-srcRect.x(), -srcRect.y());
1448 video->paintCurrentFrameInContext(c, IntRect(IntPoint(), IntSize(video->vide oWidth(), video->videoHeight()))); 1448 video->paintCurrentFrameInContext(c, IntRect(IntPoint(), IntSize(video->vide oWidth(), video->videoHeight())));
1449 stateSaver.restore(); 1449 stateSaver.restore();
1450 } 1450 }
1451 1451
1452 static void drawImageOnContext(GraphicsContext* c, CanvasImageSource* imageSourc e, Image* image, const FloatRect& srcRect, const FloatRect& dstRect) 1452 static void drawImageOnContext(GraphicsContext* c, CanvasImageSource* imageSourc e, Image* image, const FloatRect& srcRect, const FloatRect& dstRect)
1453 { 1453 {
1454 if (!imageSource->isVideoElement()) { 1454 if (!imageSource->isVideoElement()) {
1455 c->drawImage(image, dstRect, srcRect, c->compositeOperation(), c->blendM odeOperation()); 1455 c->drawImage(image, dstRect, srcRect, c->compositeOperationDeprecated(), c->blendModeOperation());
1456 } else { 1456 } else {
1457 drawVideo(c, static_cast<HTMLVideoElement*>(imageSource), srcRect, dstRe ct); 1457 drawVideo(c, static_cast<HTMLVideoElement*>(imageSource), srcRect, dstRe ct);
1458 } 1458 }
1459 } 1459 }
1460 1460
1461 void CanvasRenderingContext2D::drawImageInternal(CanvasImageSource* imageSource, 1461 void CanvasRenderingContext2D::drawImageInternal(CanvasImageSource* imageSource,
1462 float sx, float sy, float sw, float sh, 1462 float sx, float sy, float sw, float sh,
1463 float dx, float dy, float dw, float dh, ExceptionState& exceptionState) 1463 float dx, float dy, float dw, float dh, ExceptionState& exceptionState)
1464 { 1464 {
1465 RefPtr<Image> image; 1465 RefPtr<Image> image;
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 2362
2363 unsigned CanvasRenderingContext2D::hitRegionsCount() const 2363 unsigned CanvasRenderingContext2D::hitRegionsCount() const
2364 { 2364 {
2365 if (m_hitRegionManager) 2365 if (m_hitRegionManager)
2366 return m_hitRegionManager->getHitRegionsCount(); 2366 return m_hitRegionManager->getHitRegionsCount();
2367 2367
2368 return 0; 2368 return 0;
2369 } 2369 }
2370 2370
2371 } // namespace blink 2371 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLVideoElement.cpp ('k') | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698