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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/paint/SkPictureBuilder.h" 5 #include "platform/graphics/paint/SkPictureBuilder.h"
6 6
7 #include "platform/geometry/FloatRect.h" 7 #include "platform/geometry/FloatRect.h"
8 #include "platform/graphics/GraphicsContext.h" 8 #include "platform/graphics/GraphicsContext.h"
9 #include "platform/graphics/paint/PaintController.h" 9 #include "platform/graphics/paint/PaintController.h"
10 #include "wtf/PtrUtil.h" 10 #include "wtf/PtrUtil.h"
(...skipping 19 matching lines...) Expand all
30 new GraphicsContext(*m_paintController, disabledMode, metaData)); 30 new GraphicsContext(*m_paintController, disabledMode, metaData));
31 31
32 if (containingContext) { 32 if (containingContext) {
33 m_context->setDeviceScaleFactor(containingContext->deviceScaleFactor()); 33 m_context->setDeviceScaleFactor(containingContext->deviceScaleFactor());
34 m_context->setPrinting(containingContext->printing()); 34 m_context->setPrinting(containingContext->printing());
35 } 35 }
36 } 36 }
37 37
38 SkPictureBuilder::~SkPictureBuilder() {} 38 SkPictureBuilder::~SkPictureBuilder() {}
39 39
40 sk_sp<SkPicture> SkPictureBuilder::endRecording() { 40 sk_sp<CdlPicture> SkPictureBuilder::endRecording() {
41 m_context->beginRecording(m_bounds); 41 m_context->beginRecording(m_bounds);
42 m_paintController->commitNewDisplayItems(); 42 m_paintController->commitNewDisplayItems();
43 m_paintController->paintArtifact().replay(*m_context); 43 m_paintController->paintArtifact().replay(*m_context);
44 return m_context->endRecording(); 44 return m_context->endRecording();
45 } 45 }
46 46
47 } // namespace blink 47 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698