OLD | NEW |
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> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
9 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
10 #include "third_party/skia/include/core/SkMallocPixelRef.h" | 12 #include "third_party/skia/include/core/SkMallocPixelRef.h" |
11 #include "third_party/skia/include/core/SkPixelRef.h" | 13 #include "third_party/skia/include/core/SkPixelRef.h" |
12 | 14 |
13 namespace cc { | 15 namespace cc { |
14 namespace { | 16 namespace { |
15 | 17 |
16 UIResourceBitmap::UIResourceFormat SkColorTypeToUIResourceFormat( | 18 UIResourceBitmap::UIResourceFormat SkColorTypeToUIResourceFormat( |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 86 |
85 AutoLockUIResourceBitmap::~AutoLockUIResourceBitmap() { | 87 AutoLockUIResourceBitmap::~AutoLockUIResourceBitmap() { |
86 bitmap_.pixel_ref_->unlockPixels(); | 88 bitmap_.pixel_ref_->unlockPixels(); |
87 } | 89 } |
88 | 90 |
89 const uint8_t* AutoLockUIResourceBitmap::GetPixels() const { | 91 const uint8_t* AutoLockUIResourceBitmap::GetPixels() const { |
90 return static_cast<const uint8_t*>(bitmap_.pixel_ref_->pixels()); | 92 return static_cast<const uint8_t*>(bitmap_.pixel_ref_->pixels()); |
91 } | 93 } |
92 | 94 |
93 } // namespace cc | 95 } // namespace cc |
OLD | NEW |