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

Side by Side Diff: Source/core/layout/svg/LayoutSVGResourceClipper.cpp

Issue 1203343002: WIP for display item list backed by ListContainer Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 if (clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { 136 if (clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
137 AffineTransform transform; 137 AffineTransform transform;
138 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); 138 transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
139 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h eight()); 139 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h eight());
140 clipPath.transform(transform); 140 clipPath.transform(transform);
141 } 141 }
142 142
143 // Transform path by animatedLocalTransform. 143 // Transform path by animatedLocalTransform.
144 clipPath.transform(animatedLocalTransform); 144 clipPath.transform(animatedLocalTransform);
145 145
146 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { 146 //if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
147 if (!context->displayItemList()->displayItemConstructionIsDisabled()) 147 // if (!context->displayItemList()->displayItemConstructionIsDisabled())
148 context->displayItemList()->add(BeginClipPathDisplayItem::create(lay outObject, clipPath)); 148 // context->displayItemList()->add(BeginClipPathDisplayItem::create(l ayoutObject, clipPath));
149 } else { 149 //} else {
150 BeginClipPathDisplayItem clipPathDisplayItem(layoutObject, clipPath); 150 // BeginClipPathDisplayItem clipPathDisplayItem(layoutObject, clipPath);
151 clipPathDisplayItem.replay(*context); 151 // clipPathDisplayItem.replay(*context);
152 } 152 //}
153 153
154 return true; 154 return true;
155 } 155 }
156 156
157 PassRefPtr<const SkPicture> LayoutSVGResourceClipper::createContentPicture(Affin eTransform& contentTransformation, const FloatRect& targetBoundingBox, 157 PassRefPtr<const SkPicture> LayoutSVGResourceClipper::createContentPicture(Affin eTransform& contentTransformation, const FloatRect& targetBoundingBox,
158 GraphicsContext* context) 158 GraphicsContext* context)
159 { 159 {
160 ASSERT(frame()); 160 ASSERT(frame());
161 161
162 if (clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { 162 if (clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 AffineTransform transform; 281 AffineTransform transform;
282 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); 282 transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
283 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h eight()); 283 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h eight());
284 return transform.mapRect(m_clipBoundaries); 284 return transform.mapRect(m_clipBoundaries);
285 } 285 }
286 286
287 return m_clipBoundaries; 287 return m_clipBoundaries;
288 } 288 }
289 289
290 } 290 }
OLDNEW
« no previous file with comments | « Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp ('k') | Source/core/paint/BoxClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698