| OLD | NEW |
| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 ++m_layerCount; | 248 ++m_layerCount; |
| 249 #endif | 249 #endif |
| 250 } | 250 } |
| 251 | 251 |
| 252 void GraphicsContext::endLayer() { | 252 void GraphicsContext::endLayer() { |
| 253 if (contextDisabled()) | 253 if (contextDisabled()) |
| 254 return; | 254 return; |
| 255 | 255 |
| 256 restoreLayer(); | 256 restoreLayer(); |
| 257 | 257 |
| 258 ASSERT(m_layerCount-- > 0); | 258 #if DCHECK_IS_ON() |
| 259 DCHECK_GT(m_layerCount--, 0); |
| 260 #endif |
| 259 } | 261 } |
| 260 | 262 |
| 261 void GraphicsContext::beginRecording(const FloatRect& bounds) { | 263 void GraphicsContext::beginRecording(const FloatRect& bounds) { |
| 262 if (contextDisabled()) | 264 if (contextDisabled()) |
| 263 return; | 265 return; |
| 264 | 266 |
| 265 m_canvas = m_pictureRecorder.beginRecording(bounds, nullptr); | 267 m_canvas = m_pictureRecorder.beginRecording(bounds, nullptr); |
| 266 if (m_hasMetaData) | 268 if (m_hasMetaData) |
| 267 skia::GetMetaData(*m_canvas) = m_metaData; | 269 skia::GetMetaData(*m_canvas) = m_metaData; |
| 268 } | 270 } |
| (...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 static const SkPMColor colors[] = { | 1410 static const SkPMColor colors[] = { |
| 1409 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red | 1411 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red |
| 1410 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray | 1412 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray |
| 1411 }; | 1413 }; |
| 1412 | 1414 |
| 1413 return colors[index]; | 1415 return colors[index]; |
| 1414 } | 1416 } |
| 1415 #endif | 1417 #endif |
| 1416 | 1418 |
| 1417 } // namespace blink | 1419 } // namespace blink |
| OLD | NEW |