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

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

Issue 1432503003: Comments Style: s/skbug.com/bug.skia.org/ (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: include 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 | « src/core/SkConvolver.cpp ('k') | src/core/SkImageGenerator.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 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkBitmapCache.h" 9 #include "SkBitmapCache.h"
10 #include "SkImage_Base.h" 10 #include "SkImage_Base.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 SkBitmap::Allocator* allocator = SkResourceCache::GetAllocator(); 87 SkBitmap::Allocator* allocator = SkResourceCache::GetAllocator();
88 88
89 ScopedGenerator generator(this); 89 ScopedGenerator generator(this);
90 const SkImageInfo& genInfo = generator->getInfo(); 90 const SkImageInfo& genInfo = generator->getInfo();
91 if (fInfo.dimensions() == genInfo.dimensions()) { 91 if (fInfo.dimensions() == genInfo.dimensions()) {
92 SkASSERT(fOrigin.x() == 0 && fOrigin.y() == 0); 92 SkASSERT(fOrigin.x() == 0 && fOrigin.y() == 0);
93 // fast-case, no copy needed 93 // fast-case, no copy needed
94 return generator->tryGenerateBitmap(bitmap, fInfo, allocator); 94 return generator->tryGenerateBitmap(bitmap, fInfo, allocator);
95 } else { 95 } else {
96 // need to handle subsetting, so we first generate the full size version , and then 96 // need to handle subsetting, so we first generate the full size version , and then
97 // "read" from it to get our subset. See skbug.com/4213 97 // "read" from it to get our subset. See https://bug.skia.org/4213
98 98
99 SkBitmap full; 99 SkBitmap full;
100 if (!generator->tryGenerateBitmap(&full, genInfo, allocator)) { 100 if (!generator->tryGenerateBitmap(&full, genInfo, allocator)) {
101 return false; 101 return false;
102 } 102 }
103 if (!bitmap->tryAllocPixels(fInfo, nullptr, full.getColorTable())) { 103 if (!bitmap->tryAllocPixels(fInfo, nullptr, full.getColorTable())) {
104 return false; 104 return false;
105 } 105 }
106 return full.readPixels(bitmap->info(), bitmap->getPixels(), bitmap->rowB ytes(), 106 return full.readPixels(bitmap->info(), bitmap->getPixels(), bitmap->rowB ytes(),
107 fOrigin.x(), fOrigin.y()); 107 fOrigin.x(), fOrigin.y());
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 325 }
326 326
327 #else 327 #else
328 328
329 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&, 329 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&,
330 const SkImage* client) { 330 const SkImage* client) {
331 return nullptr; 331 return nullptr;
332 } 332 }
333 333
334 #endif 334 #endif
OLDNEW
« no previous file with comments | « src/core/SkConvolver.cpp ('k') | src/core/SkImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698