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

Side by Side Diff: experimental/ChromeUtils/SkBorder.cpp

Issue 86263003: New Composite CSS border object (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Moved to experimental Created 7 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkBorder.h"
9
10 SkBorder::SkBorder(SkPaint& p, SkScalar width, BorderStyle style)
11 : fFlags(kOnePaint_Flag) {
12 fPaints[0] = p;
13
14 for (int i = 0; i < 4; ++i) {
15 fWidths[i] = width;
16 fStyles[i] = style;
17 }
18 }
19
20 SkBorder::SkBorder(const SkPaint paints[4],
21 const SkScalar widths[4],
22 const BorderStyle styles[4])
23 : fFlags(0) {
24 for (int i = 0; i < 4; ++i) {
25 fPaints[i] = paints[i];
26 }
27
28 memcpy(fWidths, widths, sizeof(fWidths));
29 memcpy(fStyles, styles, sizeof(fStyles));
30 }
31
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698