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

Side by Side Diff: third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp

Issue 2007553002: Retire setGradientSpaceTransform, setPatternSpaceTransform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fmalita discovers SkMatrix::I() Created 4 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) 2009 Apple Inc. 2 * Copyright (C) 2009 Apple Inc.
3 * Copyright (C) 2009 Google Inc. 3 * Copyright (C) 2009 Google Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // Calculate white-grey gradient. 266 // Calculate white-grey gradient.
267 FloatPoint sliderTopLeft = highlightRect.location(); 267 FloatPoint sliderTopLeft = highlightRect.location();
268 FloatPoint sliderBottomLeft = sliderTopLeft; 268 FloatPoint sliderBottomLeft = sliderTopLeft;
269 sliderBottomLeft.move(0, highlightRect.height()); 269 sliderBottomLeft.move(0, highlightRect.height());
270 RefPtr<Gradient> gradient = Gradient::create(sliderTopLeft, sliderBottomLeft ); 270 RefPtr<Gradient> gradient = Gradient::create(sliderTopLeft, sliderBottomLeft );
271 gradient->addColorStop(0.0, startColor); 271 gradient->addColorStop(0.0, startColor);
272 gradient->addColorStop(1.0, endColor); 272 gradient->addColorStop(1.0, endColor);
273 273
274 // Fill highlight rectangle with gradient, potentially rounded if on left or right edge. 274 // Fill highlight rectangle with gradient, potentially rounded if on left or right edge.
275 SkPaint gradientPaint(context.fillPaint()); 275 SkPaint gradientPaint(context.fillPaint());
276 gradient->applyToPaint(gradientPaint); 276 gradient->applyToPaint(gradientPaint, SkMatrix::I());
277 277
278 if (startOffset < borderRadius && endOffset < borderRadius) 278 if (startOffset < borderRadius && endOffset < borderRadius)
279 context.drawRRect(FloatRoundedRect(highlightRect, radii, radii, radii, r adii), gradientPaint); 279 context.drawRRect(FloatRoundedRect(highlightRect, radii, radii, radii, r adii), gradientPaint);
280 else if (startOffset < borderRadius) 280 else if (startOffset < borderRadius)
281 context.drawRRect(FloatRoundedRect(highlightRect, radii, FloatSize(0, 0) , radii, FloatSize(0, 0)), gradientPaint); 281 context.drawRRect(FloatRoundedRect(highlightRect, radii, FloatSize(0, 0) , radii, FloatSize(0, 0)), gradientPaint);
282 else if (endOffset < borderRadius) 282 else if (endOffset < borderRadius)
283 context.drawRRect(FloatRoundedRect(highlightRect, FloatSize(0, 0), radii , FloatSize(0, 0), radii), gradientPaint); 283 context.drawRRect(FloatRoundedRect(highlightRect, FloatSize(0, 0), radii , FloatSize(0, 0), radii), gradientPaint);
284 else 284 else
285 context.drawRect(highlightRect, gradientPaint); 285 context.drawRect(highlightRect, gradientPaint);
286 } 286 }
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 } 632 }
633 633
634 float zoomLevel = style.effectiveZoom(); 634 float zoomLevel = style.effectiveZoom();
635 if (thumbImage) { 635 if (thumbImage) {
636 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed)); 636 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed));
637 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed)); 637 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed));
638 } 638 }
639 } 639 }
640 640
641 } // namespace blink 641 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698