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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp

Issue 2879773002: Replace remaining ASSERT with DCHECK|DCHECK_FOO in modules (Closed)
Patch Set: Replace remaining ASSERT with DCHECK|DCHECK_FOO in modules Created 3 years, 7 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) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 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 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform())); 121 flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform()));
122 break; 122 break;
123 default: 123 default:
124 NOTREACHED(); 124 NOTREACHED();
125 } 125 }
126 } 126 }
127 127
128 RGBA32 CanvasStyle::PaintColor() const { 128 RGBA32 CanvasStyle::PaintColor() const {
129 if (type_ == kColorRGBA) 129 if (type_ == kColorRGBA)
130 return rgba_; 130 return rgba_;
131 ASSERT(type_ == kGradient || type_ == kImagePattern); 131 DCHECK(type_ == kGradient || type_ == kImagePattern);
132 return Color::kBlack; 132 return Color::kBlack;
133 } 133 }
134 134
135 DEFINE_TRACE(CanvasStyle) { 135 DEFINE_TRACE(CanvasStyle) {
136 visitor->Trace(gradient_); 136 visitor->Trace(gradient_);
137 visitor->Trace(pattern_); 137 visitor->Trace(pattern_);
138 } 138 }
139 139
140 } // namespace blink 140 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698