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

Side by Side Diff: include/gpu/GrTypes.h

Issue 868233005: Revert of Move npot resizing out of GrContext and simplify GrContext texture functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « include/gpu/GrResourceKey.h ('k') | src/effects/SkBlurMaskFilter.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 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 #ifndef GrTypes_DEFINED 9 #ifndef GrTypes_DEFINED
10 #define GrTypes_DEFINED 10 #define GrTypes_DEFINED
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 case kETC1_GrPixelConfig: 295 case kETC1_GrPixelConfig:
296 case kLATC_GrPixelConfig: 296 case kLATC_GrPixelConfig:
297 case kR11_EAC_GrPixelConfig: 297 case kR11_EAC_GrPixelConfig:
298 case kASTC_12x12_GrPixelConfig: 298 case kASTC_12x12_GrPixelConfig:
299 return true; 299 return true;
300 default: 300 default:
301 return false; 301 return false;
302 } 302 }
303 } 303 }
304 304
305 /** If the pixel config is compressed, return an equivalent uncompressed format. */
306 static inline GrPixelConfig GrMakePixelConfigUncompressed(GrPixelConfig config) {
307 switch (config) {
308 case kIndex_8_GrPixelConfig:
309 case kETC1_GrPixelConfig:
310 case kASTC_12x12_GrPixelConfig:
311 return kRGBA_8888_GrPixelConfig;
312 case kLATC_GrPixelConfig:
313 case kR11_EAC_GrPixelConfig:
314 return kAlpha_8_GrPixelConfig;
315 default:
316 SkASSERT(!GrPixelConfigIsCompressed(config));
317 return config;
318 }
319 }
320
321 // Returns true if the pixel config is 32 bits per pixel 305 // Returns true if the pixel config is 32 bits per pixel
322 static inline bool GrPixelConfigIs8888(GrPixelConfig config) { 306 static inline bool GrPixelConfigIs8888(GrPixelConfig config) {
323 switch (config) { 307 switch (config) {
324 case kRGBA_8888_GrPixelConfig: 308 case kRGBA_8888_GrPixelConfig:
325 case kBGRA_8888_GrPixelConfig: 309 case kBGRA_8888_GrPixelConfig:
326 case kSRGBA_8888_GrPixelConfig: 310 case kSRGBA_8888_GrPixelConfig:
327 return true; 311 return true;
328 default: 312 default:
329 return false; 313 return false;
330 } 314 }
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 public: 639 public:
656 GrAutoMalloc() : INHERITED() {} 640 GrAutoMalloc() : INHERITED() {}
657 explicit GrAutoMalloc(size_t size) : INHERITED(size) {} 641 explicit GrAutoMalloc(size_t size) : INHERITED(size) {}
658 virtual ~GrAutoMalloc() {} 642 virtual ~GrAutoMalloc() {}
659 private: 643 private:
660 typedef GrAutoMallocBaseType INHERITED; 644 typedef GrAutoMallocBaseType INHERITED;
661 }; 645 };
662 646
663 #undef GrAutoMallocBaseType 647 #undef GrAutoMallocBaseType
664 #endif 648 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrResourceKey.h ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698