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

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

Issue 23581008: Revert r154797: "Move isValid/isCurrentColor from Color to StyleColor" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 m_state->m_fillPattern.clear(); 266 m_state->m_fillPattern.clear();
267 } 267 }
268 268
269 void GraphicsContext::setShadow(const FloatSize& offset, float blur, const Color & color, 269 void GraphicsContext::setShadow(const FloatSize& offset, float blur, const Color & color,
270 DrawLooper::ShadowTransformMode shadowTransformMode, 270 DrawLooper::ShadowTransformMode shadowTransformMode,
271 DrawLooper::ShadowAlphaMode shadowAlphaMode) 271 DrawLooper::ShadowAlphaMode shadowAlphaMode)
272 { 272 {
273 if (paintingDisabled()) 273 if (paintingDisabled())
274 return; 274 return;
275 275
276 if (!color.alpha() || (!offset.width() && !offset.height() && !blur)) { 276 if (!color.isValid() || !color.alpha() || (!offset.width() && !offset.height () && !blur)) {
277 clearShadow(); 277 clearShadow();
278 return; 278 return;
279 } 279 }
280 280
281 DrawLooper drawLooper; 281 DrawLooper drawLooper;
282 drawLooper.addShadow(offset, blur, color, shadowTransformMode, shadowAlphaMo de); 282 drawLooper.addShadow(offset, blur, color, shadowTransformMode, shadowAlphaMo de);
283 drawLooper.addUnmodifiedContent(); 283 drawLooper.addUnmodifiedContent();
284 setDrawLooper(drawLooper); 284 setDrawLooper(drawLooper);
285 } 285 }
286 286
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 1857
1858 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) 1858 void GraphicsContext::didDrawTextInRect(const SkRect& textRect)
1859 { 1859 {
1860 if (m_trackTextRegion) { 1860 if (m_trackTextRegion) {
1861 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); 1861 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion");
1862 m_textRegion.join(textRect); 1862 m_textRegion.join(textRect);
1863 } 1863 }
1864 } 1864 }
1865 1865
1866 } 1866 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698