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

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

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... Created 4 years, 3 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
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 12 matching lines...) Expand all
23 m_context = wrapUnique(new GraphicsContext(*m_paintController, disabledMode, metaData)); 23 m_context = wrapUnique(new GraphicsContext(*m_paintController, disabledMode, metaData));
24 24
25 if (containingContext) { 25 if (containingContext) {
26 m_context->setDeviceScaleFactor(containingContext->deviceScaleFactor()); 26 m_context->setDeviceScaleFactor(containingContext->deviceScaleFactor());
27 m_context->setPrinting(containingContext->printing()); 27 m_context->setPrinting(containingContext->printing());
28 } 28 }
29 } 29 }
30 30
31 SkPictureBuilder::~SkPictureBuilder() {} 31 SkPictureBuilder::~SkPictureBuilder() {}
32 32
33 PassRefPtr<SkPicture> SkPictureBuilder::endRecording() 33 sk_sp<SkPicture> SkPictureBuilder::endRecording()
34 { 34 {
35 m_context->beginRecording(m_bounds); 35 m_context->beginRecording(m_bounds);
36 m_paintController->endSkippingCache(); 36 m_paintController->endSkippingCache();
37 m_paintController->commitNewDisplayItems(); 37 m_paintController->commitNewDisplayItems();
38 m_paintController->paintArtifact().replay(*m_context); 38 m_paintController->paintArtifact().replay(*m_context);
39 return m_context->endRecording(); 39 return m_context->endRecording();
40 } 40 }
41 41
42 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698