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

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

Issue 2686033005: Move metafile printing code from platform canvas to PaintCanvas (Closed)
Patch Set: Fix missing build_config include Created 3 years, 10 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
« no previous file with comments | « skia/ext/platform_canvas.cc ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « skia/ext/platform_canvas.cc ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698