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

Side by Side Diff: skia/public/interfaces/bitmap_skbitmap_struct_traits.cc

Issue 2045723002: mojo ArrayTraits<T>::Resize returns bool indicating success (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed pach 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 "skia/public/interfaces/bitmap_skbitmap_struct_traits.h" 5 #include "skia/public/interfaces/bitmap_skbitmap_struct_traits.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 8
9 namespace { 9 namespace {
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 return *(b.data + i); 131 return *(b.data + i);
132 } 132 }
133 133
134 // static 134 // static
135 const uint8_t& ArrayTraits<BitmapBuffer>::GetAt(const BitmapBuffer& b, 135 const uint8_t& ArrayTraits<BitmapBuffer>::GetAt(const BitmapBuffer& b,
136 size_t i) { 136 size_t i) {
137 return *(b.data + i); 137 return *(b.data + i);
138 } 138 }
139 139
140 // static 140 // static
141 void ArrayTraits<BitmapBuffer>::Resize(BitmapBuffer& b, size_t size) { 141 bool ArrayTraits<BitmapBuffer>::Resize(BitmapBuffer& b, size_t size) {
142 CHECK_EQ(size, b.size); 142 return b.size == size;
143 } 143 }
144 144
145 // static 145 // static
146 bool StructTraits<skia::mojom::Bitmap, SkBitmap>::IsNull(const SkBitmap& b) { 146 bool StructTraits<skia::mojom::Bitmap, SkBitmap>::IsNull(const SkBitmap& b) {
147 return b.isNull(); 147 return b.isNull();
148 } 148 }
149 149
150 // static 150 // static
151 void StructTraits<skia::mojom::Bitmap, SkBitmap>::SetToNull(SkBitmap* b) { 151 void StructTraits<skia::mojom::Bitmap, SkBitmap>::SetToNull(SkBitmap* b) {
152 b->reset(); 152 b->reset();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 233 }
234 234
235 // static 235 // static
236 void StructTraits<skia::mojom::Bitmap, SkBitmap>::TearDownContext( 236 void StructTraits<skia::mojom::Bitmap, SkBitmap>::TearDownContext(
237 const SkBitmap& b, 237 const SkBitmap& b,
238 void* context) { 238 void* context) {
239 b.unlockPixels(); 239 b.unlockPixels();
240 } 240 }
241 241
242 } // namespace mojo 242 } // namespace mojo
OLDNEW
« no previous file with comments | « skia/public/interfaces/bitmap_skbitmap_struct_traits.h ('k') | ui/events/mojo/latency_info_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698