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

Side by Side Diff: src/lazy/SkDiscardablePixelRef.cpp

Issue 1229933003: add runtime option to provide data->imagegenerator factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "SkDiscardablePixelRef.h" 8 #include "SkDiscardablePixelRef.h"
9 #include "SkDiscardableMemory.h" 9 #include "SkDiscardableMemory.h"
10 #include "SkImageGenerator.h" 10 #include "SkImageGenerator.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return true; 143 return true;
144 } 144 }
145 145
146 // These are the public API 146 // These are the public API
147 147
148 bool SkInstallDiscardablePixelRef(SkImageGenerator* generator, SkBitmap* dst) { 148 bool SkInstallDiscardablePixelRef(SkImageGenerator* generator, SkBitmap* dst) {
149 return SkInstallDiscardablePixelRef(generator, NULL, dst, NULL); 149 return SkInstallDiscardablePixelRef(generator, NULL, dst, NULL);
150 } 150 }
151 151
152 bool SkInstallDiscardablePixelRef(SkData* encoded, SkBitmap* dst) { 152 bool SkInstallDiscardablePixelRef(SkData* encoded, SkBitmap* dst) {
153 SkImageGenerator* generator = SkImageGenerator::NewFromData(encoded); 153 SkImageGenerator* generator = SkImageGenerator::NewFromEncoded(encoded);
154 return generator ? SkInstallDiscardablePixelRef(generator, NULL, dst, NULL) : false; 154 return generator ? SkInstallDiscardablePixelRef(generator, NULL, dst, NULL) : false;
155 } 155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698