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

Side by Side Diff: tools/SkBitmapRegionDecoder.cpp

Issue 1415243007: Rename SkBitmapRegionDecoder and Create function (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « tools/SkBitmapRegionDecoder.h ('k') | tools/SkBitmapRegionDecoderInterface.h » ('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 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmapRegionCanvas.h" 8 #include "SkBitmapRegionCanvas.h"
9 #include "SkBitmapRegionCodec.h" 9 #include "SkBitmapRegionCodec.h"
10 #include "SkBitmapRegionDecoderInterface.h" 10 #include "SkBitmapRegionDecoder.h"
11 #include "SkBitmapRegionSampler.h" 11 #include "SkBitmapRegionSampler.h"
12 #include "SkAndroidCodec.h" 12 #include "SkAndroidCodec.h"
13 #include "SkCodec.h" 13 #include "SkCodec.h"
14 #include "SkCodecPriv.h" 14 #include "SkCodecPriv.h"
15 #include "SkImageDecoder.h" 15 #include "SkImageDecoder.h"
16 16
17 SkBitmapRegionDecoderInterface* SkBitmapRegionDecoderInterface::CreateBitmapRegi onDecoder( 17 SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create(
18 SkData* data, Strategy strategy) { 18 SkData* data, Strategy strategy) {
19 return SkBitmapRegionDecoderInterface::CreateBitmapRegionDecoder(new SkMemor yStream(data), 19 return SkBitmapRegionDecoder::Create(new SkMemoryStream(data),
20 strategy); 20 strategy);
21 } 21 }
22 22
23 SkBitmapRegionDecoderInterface* SkBitmapRegionDecoderInterface::CreateBitmapRegi onDecoder( 23 SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create(
24 SkStreamRewindable* stream, Strategy strategy) { 24 SkStreamRewindable* stream, Strategy strategy) {
25 SkAutoTDelete<SkStreamRewindable> streamDeleter(stream); 25 SkAutoTDelete<SkStreamRewindable> streamDeleter(stream);
26 switch (strategy) { 26 switch (strategy) {
27 case kOriginal_Strategy: { 27 case kOriginal_Strategy: {
28 SkImageDecoder* decoder = SkImageDecoder::Factory(streamDeleter); 28 SkImageDecoder* decoder = SkImageDecoder::Factory(streamDeleter);
29 int width, height; 29 int width, height;
30 if (nullptr == decoder) { 30 if (nullptr == decoder) {
31 SkCodecPrintf("Error: Could not create image decoder.\n"); 31 SkCodecPrintf("Error: Could not create image decoder.\n");
32 return nullptr; 32 return nullptr;
33 } 33 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 SkCodecPrintf("Error: Failed to create codec.\n"); 68 SkCodecPrintf("Error: Failed to create codec.\n");
69 return NULL; 69 return NULL;
70 } 70 }
71 return new SkBitmapRegionCodec(codec.detach()); 71 return new SkBitmapRegionCodec(codec.detach());
72 } 72 }
73 default: 73 default:
74 SkASSERT(false); 74 SkASSERT(false);
75 return nullptr; 75 return nullptr;
76 } 76 }
77 } 77 }
OLDNEW
« no previous file with comments | « tools/SkBitmapRegionDecoder.h ('k') | tools/SkBitmapRegionDecoderInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698