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

Side by Side Diff: skia/public/type_converters.cc

Issue 1540963004: Switch to standard integer types in skia/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed some Created 5 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
« skia/ext/convolver.h ('K') | « skia/ext/skia_utils_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "skia/public/type_converters.h" 5 #include "skia/public/type_converters.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
7 #include <string.h> 9 #include <string.h>
8 10
9 #include "base/logging.h" 11 #include "base/logging.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 12 #include "third_party/skia/include/core/SkBitmap.h"
11 13
12 namespace mojo { 14 namespace mojo {
13 15
14 namespace { 16 namespace {
15 17
16 SkColorType MojoColorTypeToSk(skia::ColorType type) { 18 SkColorType MojoColorTypeToSk(skia::ColorType type) {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 result->height = info.height(); 132 result->height = info.height();
131 size_t size = bitmap.getSize(); 133 size_t size = bitmap.getSize();
132 size_t row_bytes = bitmap.rowBytes(); 134 size_t row_bytes = bitmap.rowBytes();
133 result->pixel_data = mojo::Array<uint8_t>::New(size); 135 result->pixel_data = mojo::Array<uint8_t>::New(size);
134 if (!bitmap.readPixels(info, &result->pixel_data[0], row_bytes, 0, 0)) 136 if (!bitmap.readPixels(info, &result->pixel_data[0], row_bytes, 0, 0))
135 return nullptr; 137 return nullptr;
136 return result; 138 return result;
137 } 139 }
138 140
139 } // namespace mojo 141 } // namespace mojo
OLDNEW
« skia/ext/convolver.h ('K') | « skia/ext/skia_utils_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698