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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourceClipper.cpp

Issue 661053003: Make beginLayer() and CanvasRenderingContext2D use SkXfermode::Mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase to ToT 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2011 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2011 Dirk Schulze <krit@webkit.org>
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 return false; 193 return false;
194 } 194 }
195 195
196 drawClipMaskContent(context, targetBoundingBox); 196 drawClipMaskContent(context, targetBoundingBox);
197 197
198 if (clipPathClipper) 198 if (clipPathClipper)
199 clipPathClipper->postApplyStatefulResource(this, context, clipPathCl ipperState); 199 clipPathClipper->postApplyStatefulResource(this, context, clipPathCl ipperState);
200 } 200 }
201 201
202 // Masked content layer start. 202 // Masked content layer start.
203 context->beginLayer(1, CompositeSourceIn, &paintInvalidationRect); 203 context->beginLayer(1, SkXfermode::kSrcIn_Mode, &paintInvalidationRect);
204 204
205 return true; 205 return true;
206 } 206 }
207 207
208 void RenderSVGResourceClipper::postApplyStatefulResource(RenderObject* target, G raphicsContext*& context, ClipperState& clipperState) 208 void RenderSVGResourceClipper::postApplyStatefulResource(RenderObject* target, G raphicsContext*& context, ClipperState& clipperState)
209 { 209 {
210 switch (clipperState) { 210 switch (clipperState) {
211 case ClipperAppliedPath: 211 case ClipperAppliedPath:
212 // Path-only clipping, no layers to restore but we need to emit an end t o the clip path display item. 212 // Path-only clipping, no layers to restore but we need to emit an end t o the clip path display item.
213 { 213 {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 AffineTransform transform; 365 AffineTransform transform;
366 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); 366 transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
367 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h eight()); 367 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h eight());
368 return transform.mapRect(m_clipBoundaries); 368 return transform.mapRect(m_clipBoundaries);
369 } 369 }
370 370
371 return m_clipBoundaries; 371 return m_clipBoundaries;
372 } 372 }
373 373
374 } 374 }
OLDNEW
« no previous file with comments | « Source/core/html/canvas/CanvasRenderingContext2D.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698