| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef GrGLCaps_DEFINED | 9 #ifndef GrGLCaps_DEFINED |
| 10 #define GrGLCaps_DEFINED | 10 #define GrGLCaps_DEFINED |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 struct ReadPixelsSupportedFormat { | 396 struct ReadPixelsSupportedFormat { |
| 397 GrGLenum fFormat; | 397 GrGLenum fFormat; |
| 398 GrGLenum fType; | 398 GrGLenum fType; |
| 399 GrGLenum fFboFormat; | 399 GrGLenum fFboFormat; |
| 400 | 400 |
| 401 bool operator==(const ReadPixelsSupportedFormat& rhs) const { | 401 bool operator==(const ReadPixelsSupportedFormat& rhs) const { |
| 402 return fFormat == rhs.fFormat | 402 return fFormat == rhs.fFormat |
| 403 && fType == rhs.fType | 403 && fType == rhs.fType |
| 404 && fFboFormat == rhs.fFboFormat; | 404 && fFboFormat == rhs.fFboFormat; |
| 405 } | 405 } |
| 406 static uint32_t Hash(const ReadPixelsSupportedFormat& r) { | |
| 407 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(&r), si
zeof(r)); | |
| 408 } | |
| 409 }; | 406 }; |
| 410 | 407 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; |
| 411 mutable SkTHashMap<ReadPixelsSupportedFormat, bool, ReadPixelsSupportedForma
t::Hash> | |
| 412 fReadPixelsSupportedCache; | |
| 413 | 408 |
| 414 typedef GrDrawTargetCaps INHERITED; | 409 typedef GrDrawTargetCaps INHERITED; |
| 415 }; | 410 }; |
| 416 | 411 |
| 417 #endif | 412 #endif |
| OLD | NEW |