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

Side by Side Diff: blimp/engine/renderer/engine_image_serialization_processor.cc

Issue 2102173003: blimp: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « blimp/engine/app/blimp_url_request_context_getter.cc ('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 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 "blimp/engine/renderer/engine_image_serialization_processor.h" 5 #include "blimp/engine/renderer/engine_image_serialization_processor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 WebPConfig config; 159 WebPConfig config;
160 CHECK(WebPConfigInit(&config)); 160 CHECK(WebPConfigInit(&config));
161 161
162 WebPPicture picture; 162 WebPPicture picture;
163 CHECK(WebPPictureInit(&picture)); 163 CHECK(WebPPictureInit(&picture));
164 picture.width = pixmap.width(); 164 picture.width = pixmap.width();
165 picture.height = pixmap.height(); 165 picture.height = pixmap.height();
166 166
167 // Import picture from raw pixels. 167 // Import picture from raw pixels.
168 auto pixel_chars = static_cast<const unsigned char*>(pixmap.addr()); 168 auto* pixel_chars = static_cast<const unsigned char*>(pixmap.addr());
169 CHECK(PlatformPictureImport(pixel_chars, &picture, pixmap.alphaType())); 169 CHECK(PlatformPictureImport(pixel_chars, &picture, pixmap.alphaType()));
170 170
171 // Set up the writer parameters. 171 // Set up the writer parameters.
172 writer_state_.size = 0; 172 writer_state_.size = 0;
173 picture.custom_ptr = &writer_state_; 173 picture.custom_ptr = &writer_state_;
174 picture.writer = &WebPMemoryWrite; 174 picture.writer = &WebPMemoryWrite;
175 175
176 // Setup the configuration for the output WebP picture. This is currently 176 // Setup the configuration for the output WebP picture. This is currently
177 // the same as the default configuration for WebP, but since any change in 177 // the same as the default configuration for WebP, but since any change in
178 // the WebP defaults would invalidate all caches they are hard coded. 178 // the WebP defaults would invalidate all caches they are hard coded.
(...skipping 22 matching lines...) Expand all
201 } 201 }
202 202
203 scoped_refptr<BlobData> blob_data(new BlobData); 203 scoped_refptr<BlobData> blob_data(new BlobData);
204 blob_data->data.assign(reinterpret_cast<const char*>(writer_state_.mem), 204 blob_data->data.assign(reinterpret_cast<const char*>(writer_state_.mem),
205 writer_state_.size); 205 writer_state_.size);
206 return blob_data; 206 return blob_data;
207 } 207 }
208 208
209 } // namespace engine 209 } // namespace engine
210 } // namespace blimp 210 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/app/blimp_url_request_context_getter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698