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

Side by Side Diff: src/gpu/SkGr.cpp

Issue 1836563002: Revert of Re-enable CPU mipmap generation for Ganesh. Aniso mips were landed a while ago. However, the CPU bu… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/gpu/GrImageIDTextureAdjuster.cpp ('k') | no next file » | 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 Google Inc. 2 * Copyright 2010 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 8
9 #include "SkGr.h" 9 #include "SkGr.h"
10 #include "SkGrPriv.h" 10 #include "SkGrPriv.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 if (texture) { 337 if (texture) {
338 return texture; 338 return texture;
339 } 339 }
340 } 340 }
341 341
342 GrTexture* texture = create_texture_from_yuv(ctx, bitmap, desc); 342 GrTexture* texture = create_texture_from_yuv(ctx, bitmap, desc);
343 if (texture) { 343 if (texture) {
344 return texture; 344 return texture;
345 } 345 }
346 346
347 // SkMipMap::Build doesn't handle sRGB data correctly (yet).
348 // Failover to the GL code-path for now.
349 if (kLinear_SkColorProfileType != bitmap.profileType()) {
350 return nullptr;
351 }
352
353 SkASSERT(sizeof(int) <= sizeof(uint32_t)); 347 SkASSERT(sizeof(int) <= sizeof(uint32_t));
354 if (bitmap.width() < 0 || bitmap.height() < 0) { 348 if (bitmap.width() < 0 || bitmap.height() < 0) {
355 return nullptr; 349 return nullptr;
356 } 350 }
357 351
358 SkAutoPixmapUnlock srcUnlocker; 352 SkAutoPixmapUnlock srcUnlocker;
359 if (!bitmap.requestLock(&srcUnlocker)) { 353 if (!bitmap.requestLock(&srcUnlocker)) {
360 return nullptr; 354 return nullptr;
361 } 355 }
362 const SkPixmap& pixmap = srcUnlocker.pixmap(); 356 const SkPixmap& pixmap = srcUnlocker.pixmap();
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 SkErrorInternals::SetError( kInvalidPaint_SkError, 743 SkErrorInternals::SetError( kInvalidPaint_SkError,
750 "Sorry, I don't understand the filtering " 744 "Sorry, I don't understand the filtering "
751 "mode you asked for. Falling back to " 745 "mode you asked for. Falling back to "
752 "MIPMaps."); 746 "MIPMaps.");
753 textureFilterMode = GrTextureParams::kMipMap_FilterMode; 747 textureFilterMode = GrTextureParams::kMipMap_FilterMode;
754 break; 748 break;
755 749
756 } 750 }
757 return textureFilterMode; 751 return textureFilterMode;
758 } 752 }
OLDNEW
« no previous file with comments | « src/gpu/GrImageIDTextureAdjuster.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698