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

Side by Side Diff: src/core/SkImageGenerator.cpp

Issue 1556333004: take gr-context parameter to refEncoded, indicating a desire for only gpu-specific formats (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox Created 4 years, 11 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 | « src/core/SkImageCacherator.cpp ('k') | src/image/SkImage.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 2014 Google Inc. 2 * Copyright 2014 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 "SkImageGenerator.h" 8 #include "SkImageGenerator.h"
9 #include "SkNextID.h" 9 #include "SkNextID.h"
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 const SkIRect subset = SkIRect::MakeXYWH(subsetOrigin.x(), subsetOrigin.y(), 130 const SkIRect subset = SkIRect::MakeXYWH(subsetOrigin.x(), subsetOrigin.y(),
131 subsetPixels.width(), subsetPixels. height()); 131 subsetPixels.width(), subsetPixels. height());
132 if (!SkIRect::MakeWH(scaledSize.width(), scaledSize.height()).contains(subse t)) { 132 if (!SkIRect::MakeWH(scaledSize.width(), scaledSize.height()).contains(subse t)) {
133 return false; 133 return false;
134 } 134 }
135 return this->onGenerateScaledPixels(scaledSize, subsetOrigin, subsetPixels); 135 return this->onGenerateScaledPixels(scaledSize, subsetOrigin, subsetPixels);
136 } 136 }
137 137
138 //////////////////////////////////////////////////////////////////////////////// ///////////// 138 //////////////////////////////////////////////////////////////////////////////// /////////////
139 139
140 SkData* SkImageGenerator::onRefEncodedData() { 140 SkData* SkImageGenerator::onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) {
141 return nullptr; 141 return nullptr;
142 } 142 }
143 143
144 bool SkImageGenerator::onGetPixels(const SkImageInfo& info, void* dst, size_t rb , 144 bool SkImageGenerator::onGetPixels(const SkImageInfo& info, void* dst, size_t rb ,
145 SkPMColor* colors, int* colorCount) { 145 SkPMColor* colors, int* colorCount) {
146 return false; 146 return false;
147 } 147 }
148 148
149 //////////////////////////////////////////////////////////////////////////////// /////////////////// 149 //////////////////////////////////////////////////////////////////////////////// ///////////////////
150 150
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 if (nullptr == data) { 238 if (nullptr == data) {
239 return nullptr; 239 return nullptr;
240 } 240 }
241 if (gFactory) { 241 if (gFactory) {
242 if (SkImageGenerator* generator = gFactory(data)) { 242 if (SkImageGenerator* generator = gFactory(data)) {
243 return generator; 243 return generator;
244 } 244 }
245 } 245 }
246 return SkImageGenerator::NewFromEncodedImpl(data); 246 return SkImageGenerator::NewFromEncodedImpl(data);
247 } 247 }
OLDNEW
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698