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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 #endif | 265 #endif |
266 } | 266 } |
267 | 267 |
268 void GraphicsContext::beginRecording(const FloatRect& bounds) { | 268 void GraphicsContext::beginRecording(const FloatRect& bounds) { |
269 if (contextDisabled()) | 269 if (contextDisabled()) |
270 return; | 270 return; |
271 | 271 |
272 DCHECK(!m_canvas); | 272 DCHECK(!m_canvas); |
273 m_canvas = m_paintRecorder.beginRecording(bounds, nullptr); | 273 m_canvas = m_paintRecorder.beginRecording(bounds, nullptr); |
274 if (m_hasMetaData) | 274 if (m_hasMetaData) |
275 skia::GetMetaData(*m_canvas) = m_metaData; | 275 m_canvas->getMetaData() = m_metaData; |
276 } | 276 } |
277 | 277 |
278 namespace { | 278 namespace { |
279 | 279 |
280 sk_sp<PaintRecord> createEmptyPaintRecord() { | 280 sk_sp<PaintRecord> createEmptyPaintRecord() { |
281 PaintRecorder recorder; | 281 PaintRecorder recorder; |
282 recorder.beginRecording(SkRect::MakeEmpty(), nullptr); | 282 recorder.beginRecording(SkRect::MakeEmpty(), nullptr); |
283 return recorder.finishRecordingAsPicture(); | 283 return recorder.finishRecordingAsPicture(); |
284 } | 284 } |
285 | 285 |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 break; | 1339 break; |
1340 default: | 1340 default: |
1341 NOTREACHED(); | 1341 NOTREACHED(); |
1342 break; | 1342 break; |
1343 } | 1343 } |
1344 | 1344 |
1345 return nullptr; | 1345 return nullptr; |
1346 } | 1346 } |
1347 | 1347 |
1348 } // namespace blink | 1348 } // namespace blink |
OLD | NEW |