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

Side by Side Diff: src/gpu/gl/GrGLCaps.h

Issue 1021033002: Some usability ideas around SkTHash. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor tweaks Created 5 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/core/SkTHash.h ('k') | src/svg/SkSVGDevice.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 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
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
OLDNEW
« no previous file with comments | « src/core/SkTHash.h ('k') | src/svg/SkSVGDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698