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

Side by Side Diff: src/images/SkImageDecoder_libwebp.cpp

Issue 27343002: Second wave of Win64 warning cleanup (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: switched count_glyphs back to int Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gr_unittests.cpp ('k') | src/images/SkJpegUtility.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010, The Android Open Source Project 2 * Copyright 2010, The Android Open Source Project
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at 6 * You may obtain a copy of the License at
7 * 7 *
8 * http://www.apache.org/licenses/LICENSE-2.0 8 * http://www.apache.org/licenses/LICENSE-2.0
9 * 9 *
10 * Unless required by applicable law or agreed to in writing, software 10 * Unless required by applicable law or agreed to in writing, software
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if (MODE_LAST == mode) { 235 if (MODE_LAST == mode) {
236 return false; 236 return false;
237 } 237 }
238 238
239 if (0 == WebPInitDecoderConfig(config)) { 239 if (0 == WebPInitDecoderConfig(config)) {
240 return false; 240 return false;
241 } 241 }
242 242
243 config->output.colorspace = mode; 243 config->output.colorspace = mode;
244 config->output.u.RGBA.rgba = (uint8_t*)decodedBitmap->getPixels(); 244 config->output.u.RGBA.rgba = (uint8_t*)decodedBitmap->getPixels();
245 config->output.u.RGBA.stride = decodedBitmap->rowBytes(); 245 config->output.u.RGBA.stride = (int) decodedBitmap->rowBytes();
246 config->output.u.RGBA.size = decodedBitmap->getSize(); 246 config->output.u.RGBA.size = decodedBitmap->getSize();
247 config->output.is_external_memory = 1; 247 config->output.is_external_memory = 1;
248 248
249 if (width != decodedBitmap->width() || height != decodedBitmap->height()) { 249 if (width != decodedBitmap->width() || height != decodedBitmap->height()) {
250 config->options.use_scaling = 1; 250 config->options.use_scaling = 1;
251 config->options.scaled_width = decodedBitmap->width(); 251 config->options.scaled_width = decodedBitmap->width();
252 config->options.scaled_height = decodedBitmap->height(); 252 config->options.scaled_height = decodedBitmap->height();
253 } 253 }
254 254
255 return true; 255 return true;
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 return SkImageDecoder::kUnknown_Format; 593 return SkImageDecoder::kUnknown_Format;
594 } 594 }
595 595
596 static SkImageEncoder* sk_libwebp_efactory(SkImageEncoder::Type t) { 596 static SkImageEncoder* sk_libwebp_efactory(SkImageEncoder::Type t) {
597 return (SkImageEncoder::kWEBP_Type == t) ? SkNEW(SkWEBPImageEncoder) : NUL L; 597 return (SkImageEncoder::kWEBP_Type == t) ? SkNEW(SkWEBPImageEncoder) : NUL L;
598 } 598 }
599 599
600 static SkImageDecoder_DecodeReg gDReg(sk_libwebp_dfactory); 600 static SkImageDecoder_DecodeReg gDReg(sk_libwebp_dfactory);
601 static SkImageDecoder_FormatReg gFormatReg(get_format_webp); 601 static SkImageDecoder_FormatReg gFormatReg(get_format_webp);
602 static SkImageEncoder_EncodeReg gEReg(sk_libwebp_efactory); 602 static SkImageEncoder_EncodeReg gEReg(sk_libwebp_efactory);
OLDNEW
« no previous file with comments | « src/gpu/gr_unittests.cpp ('k') | src/images/SkJpegUtility.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698