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

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

Issue 23576015: Change old PRG to be SkLCGRandom; change new one to SkRandom (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix some spurious SkMWCRandoms Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/effects/GrTextureDomainEffect.cpp ('k') | src/utils/SkPathUtils.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 2013 Google Inc. 2 * Copyright 2013 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 #ifndef GrGLProgramDesc_DEFINED 8 #ifndef GrGLProgramDesc_DEFINED
9 #define GrGLProgramDesc_DEFINED 9 #define GrGLProgramDesc_DEFINED
10 10
(...skipping 29 matching lines...) Expand all
40 40
41 // Gets the number of bytes in asKey(). It will be a 4-byte aligned value. W hen comparing two 41 // Gets the number of bytes in asKey(). It will be a 4-byte aligned value. W hen comparing two
42 // keys the size of either key can be used with memcmp() since the lengths t hemselves begin the 42 // keys the size of either key can be used with memcmp() since the lengths t hemselves begin the
43 // keys and thus the memcmp will exit early if the keys are of different len gths. 43 // keys and thus the memcmp will exit early if the keys are of different len gths.
44 uint32_t keyLength() const { return *this->atOffset<uint32_t, kLengthOffset> (); } 44 uint32_t keyLength() const { return *this->atOffset<uint32_t, kLengthOffset> (); }
45 45
46 // Gets the a checksum of the key. Can be used as a hash value for a fast lo okup in a cache. 46 // Gets the a checksum of the key. Can be used as a hash value for a fast lo okup in a cache.
47 uint32_t getChecksum() const { return *this->atOffset<uint32_t, kChecksumOff set>(); } 47 uint32_t getChecksum() const { return *this->atOffset<uint32_t, kChecksumOff set>(); }
48 48
49 // For unit testing. 49 // For unit testing.
50 void setRandom(SkMWCRandom*, 50 void setRandom(SkRandom*,
51 const GrGpuGL* gpu, 51 const GrGpuGL* gpu,
52 const GrRenderTarget* dummyDstRenderTarget, 52 const GrRenderTarget* dummyDstRenderTarget,
53 const GrTexture* dummyDstCopyTexture, 53 const GrTexture* dummyDstCopyTexture,
54 const GrEffectStage* stages[], 54 const GrEffectStage* stages[],
55 int numColorStages, 55 int numColorStages,
56 int numCoverageStages, 56 int numCoverageStages,
57 int currAttribIndex); 57 int currAttribIndex);
58 58
59 /** 59 /**
60 * Builds a program descriptor from a GrDrawState. Whether the primitive typ e is points, the 60 * Builds a program descriptor from a GrDrawState. Whether the primitive typ e is points, the
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 SkAutoSMalloc<kPreAllocSize> fKey; 216 SkAutoSMalloc<kPreAllocSize> fKey;
217 bool fInitialized; 217 bool fInitialized;
218 218
219 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod e. TODO: Move all 219 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod e. TODO: Move all
220 // code generation to GrGLShaderBuilder (and maybe add getters rather than f riending). 220 // code generation to GrGLShaderBuilder (and maybe add getters rather than f riending).
221 friend class GrGLProgram; 221 friend class GrGLProgram;
222 friend class GrGLShaderBuilder; 222 friend class GrGLShaderBuilder;
223 }; 223 };
224 224
225 #endif 225 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrTextureDomainEffect.cpp ('k') | src/utils/SkPathUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698