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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp

Issue 2513893002: Make ifdefs consistent in WebKit/Source/core/ (Closed)
Patch Set: Created 4 years, 1 month 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) 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 ++m_layerCount; 247 ++m_layerCount;
248 #endif 248 #endif
249 } 249 }
250 250
251 void GraphicsContext::endLayer() { 251 void GraphicsContext::endLayer() {
252 if (contextDisabled()) 252 if (contextDisabled())
253 return; 253 return;
254 254
255 restoreLayer(); 255 restoreLayer();
256 256
257 #if DCHECK_IS_ON()
257 ASSERT(m_layerCount-- > 0); 258 ASSERT(m_layerCount-- > 0);
259 #endif
258 } 260 }
259 261
260 void GraphicsContext::beginRecording(const FloatRect& bounds) { 262 void GraphicsContext::beginRecording(const FloatRect& bounds) {
261 if (contextDisabled()) 263 if (contextDisabled())
262 return; 264 return;
263 265
264 m_canvas = m_pictureRecorder.beginRecording(bounds, nullptr); 266 m_canvas = m_pictureRecorder.beginRecording(bounds, nullptr);
265 if (m_hasMetaData) 267 if (m_hasMetaData)
266 skia::GetMetaData(*m_canvas) = m_metaData; 268 skia::GetMetaData(*m_canvas) = m_metaData;
267 } 269 }
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 static const SkPMColor colors[] = { 1409 static const SkPMColor colors[] = {
1408 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red 1410 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red
1409 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray 1411 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray
1410 }; 1412 };
1411 1413
1412 return colors[index]; 1414 return colors[index];
1413 } 1415 }
1414 #endif 1416 #endif
1415 1417
1416 } // namespace blink 1418 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698