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

Side by Side Diff: Source/core/platform/graphics/GraphicsContext.cpp

Issue 20061003: Move isValid/isCurrentColor from Color to StyleColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 m_state->m_fillPattern.clear(); 270 m_state->m_fillPattern.clear();
271 } 271 }
272 272
273 void GraphicsContext::setShadow(const FloatSize& offset, float blur, const Color & color, 273 void GraphicsContext::setShadow(const FloatSize& offset, float blur, const Color & color,
274 DrawLooper::ShadowTransformMode shadowTransformMode, 274 DrawLooper::ShadowTransformMode shadowTransformMode,
275 DrawLooper::ShadowAlphaMode shadowAlphaMode) 275 DrawLooper::ShadowAlphaMode shadowAlphaMode)
276 { 276 {
277 if (paintingDisabled()) 277 if (paintingDisabled())
278 return; 278 return;
279 279
280 if (!color.isValid() || !color.alpha() || (!offset.width() && !offset.height () && !blur)) { 280 if (!color.alpha() || (!offset.width() && !offset.height() && !blur)) {
281 clearShadow(); 281 clearShadow();
282 return; 282 return;
283 } 283 }
284 284
285 DrawLooper drawLooper; 285 DrawLooper drawLooper;
286 drawLooper.addShadow(offset, blur, color, shadowTransformMode, shadowAlphaMo de); 286 drawLooper.addShadow(offset, blur, color, shadowTransformMode, shadowAlphaMo de);
287 drawLooper.addUnmodifiedContent(); 287 drawLooper.addUnmodifiedContent();
288 setDrawLooper(drawLooper); 288 setDrawLooper(drawLooper);
289 } 289 }
290 290
(...skipping 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 1889
1890 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) 1890 void GraphicsContext::didDrawTextInRect(const SkRect& textRect)
1891 { 1891 {
1892 if (m_trackTextRegion) { 1892 if (m_trackTextRegion) {
1893 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); 1893 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion");
1894 m_textRegion.join(textRect); 1894 m_textRegion.join(textRect);
1895 } 1895 }
1896 } 1896 }
1897 1897
1898 } 1898 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698