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

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

Issue 318873002: Remove GrIsPow2 in favor of SkIsPow2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 611
612 /////////////////////////////////////////////////////////////////////////////// 612 ///////////////////////////////////////////////////////////////////////////////
613 613
614 bool GrContext::supportsIndex8PixelConfig(const GrTextureParams* params, 614 bool GrContext::supportsIndex8PixelConfig(const GrTextureParams* params,
615 int width, int height) const { 615 int width, int height) const {
616 const GrDrawTargetCaps* caps = fGpu->caps(); 616 const GrDrawTargetCaps* caps = fGpu->caps();
617 if (!caps->isConfigTexturable(kIndex_8_GrPixelConfig)) { 617 if (!caps->isConfigTexturable(kIndex_8_GrPixelConfig)) {
618 return false; 618 return false;
619 } 619 }
620 620
621 bool isPow2 = GrIsPow2(width) && GrIsPow2(height); 621 bool isPow2 = SkIsPow2(width) && SkIsPow2(height);
622 622
623 if (!isPow2) { 623 if (!isPow2) {
624 bool tiled = NULL != params && params->isTiled(); 624 bool tiled = NULL != params && params->isTiled();
625 if (tiled && !caps->npotTextureTileSupport()) { 625 if (tiled && !caps->npotTextureTileSupport()) {
626 return false; 626 return false;
627 } 627 }
628 } 628 }
629 return true; 629 return true;
630 } 630 }
631 631
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 SkSafeRef(resource); 1838 SkSafeRef(resource);
1839 return resource; 1839 return resource;
1840 } 1840 }
1841 1841
1842 /////////////////////////////////////////////////////////////////////////////// 1842 ///////////////////////////////////////////////////////////////////////////////
1843 #if GR_CACHE_STATS 1843 #if GR_CACHE_STATS
1844 void GrContext::printCacheStats() const { 1844 void GrContext::printCacheStats() const {
1845 fResourceCache->printStats(); 1845 fResourceCache->printStats();
1846 } 1846 }
1847 #endif 1847 #endif
OLDNEW
« include/gpu/GrTypes.h ('K') | « include/gpu/GrTypes.h ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698