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

Side by Side Diff: cc/resources/ui_resource_bitmap.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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 | « cc/resources/ui_resource_bitmap.h ('k') | cc/resources/ui_resource_request.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/resources/ui_resource_bitmap.h" 5 #include "cc/resources/ui_resource_bitmap.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory>
10
9 #include "base/logging.h" 11 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "third_party/skia/include/core/SkBitmap.h" 12 #include "third_party/skia/include/core/SkBitmap.h"
12 #include "third_party/skia/include/core/SkMallocPixelRef.h" 13 #include "third_party/skia/include/core/SkMallocPixelRef.h"
13 #include "third_party/skia/include/core/SkPixelRef.h" 14 #include "third_party/skia/include/core/SkPixelRef.h"
14 15
15 namespace cc { 16 namespace cc {
16 namespace { 17 namespace {
17 18
18 UIResourceBitmap::UIResourceFormat SkColorTypeToUIResourceFormat( 19 UIResourceBitmap::UIResourceFormat SkColorTypeToUIResourceFormat(
19 SkColorType sk_type) { 20 SkColorType sk_type) {
20 UIResourceBitmap::UIResourceFormat format = UIResourceBitmap::RGBA8; 21 UIResourceBitmap::UIResourceFormat format = UIResourceBitmap::RGBA8;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 89
89 AutoLockUIResourceBitmap::~AutoLockUIResourceBitmap() { 90 AutoLockUIResourceBitmap::~AutoLockUIResourceBitmap() {
90 bitmap_.pixel_ref_->unlockPixels(); 91 bitmap_.pixel_ref_->unlockPixels();
91 } 92 }
92 93
93 const uint8_t* AutoLockUIResourceBitmap::GetPixels() const { 94 const uint8_t* AutoLockUIResourceBitmap::GetPixels() const {
94 return static_cast<const uint8_t*>(bitmap_.pixel_ref_->pixels()); 95 return static_cast<const uint8_t*>(bitmap_.pixel_ref_->pixels());
95 } 96 }
96 97
97 } // namespace cc 98 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/ui_resource_bitmap.h ('k') | cc/resources/ui_resource_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698