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

Side by Side Diff: third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "modules/csspaint/PaintRenderingContext2D.h" 5 #include "modules/csspaint/PaintRenderingContext2D.h"
6 6
7 #include "platform/graphics/ImageBuffer.h" 7 #include "platform/graphics/ImageBuffer.h"
8 #include <memory>
8 9
9 namespace blink { 10 namespace blink {
10 11
11 PaintRenderingContext2D::PaintRenderingContext2D(PassOwnPtr<ImageBuffer> imageBu ffer) 12 PaintRenderingContext2D::PaintRenderingContext2D(std::unique_ptr<ImageBuffer> im ageBuffer)
12 : m_imageBuffer(std::move(imageBuffer)) 13 : m_imageBuffer(std::move(imageBuffer))
13 { 14 {
14 m_clipAntialiasing = AntiAliased; 15 m_clipAntialiasing = AntiAliased;
15 modifiableState().setShouldAntialias(true); 16 modifiableState().setShouldAntialias(true);
16 } 17 }
17 18
18 int PaintRenderingContext2D::width() const 19 int PaintRenderingContext2D::width() const
19 { 20 {
20 ASSERT(m_imageBuffer); 21 ASSERT(m_imageBuffer);
21 return m_imageBuffer->size().width(); 22 return m_imageBuffer->size().width();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 { 64 {
64 #if ENABLE(ASSERT) 65 #if ENABLE(ASSERT)
65 SkCanvas* skCanvas = existingDrawingCanvas(); 66 SkCanvas* skCanvas = existingDrawingCanvas();
66 if (skCanvas) { 67 if (skCanvas) {
67 ASSERT(static_cast<size_t>(skCanvas->getSaveCount()) == m_stateStack.siz e()); 68 ASSERT(static_cast<size_t>(skCanvas->getSaveCount()) == m_stateStack.siz e());
68 } 69 }
69 #endif 70 #endif
70 } 71 }
71 72
72 } // namespace blink 73 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698