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

Side by Side Diff: src/core/SkVarAlloc.h

Issue 722293003: Cap SkVarAlloc's desired block at 64K. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comments Created 6 years, 1 month 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 | « no previous file | src/core/SkVarAlloc.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 #ifndef SkVarAlloc_DEFINED 1 #ifndef SkVarAlloc_DEFINED
2 #define SkVarAlloc_DEFINED 2 #define SkVarAlloc_DEFINED
3 3
4 #include "SkTypes.h" 4 #include "SkTypes.h"
5 5
6 class SkVarAlloc : SkNoncopyable { 6 class SkVarAlloc : SkNoncopyable {
7 public: 7 public:
8 SkVarAlloc(); 8 SkVarAlloc();
9 ~SkVarAlloc(); 9 ~SkVarAlloc();
10 10
(...skipping 10 matching lines...) Expand all
21 fByte += bytes; 21 fByte += bytes;
22 fRemaining -= bytes; 22 fRemaining -= bytes;
23 return ptr; 23 return ptr;
24 } 24 }
25 25
26 private: 26 private:
27 void makeSpace(size_t bytes, unsigned flags); 27 void makeSpace(size_t bytes, unsigned flags);
28 28
29 char* fByte; 29 char* fByte;
30 unsigned fRemaining; 30 unsigned fRemaining;
31 unsigned fLgMinSize; 31 unsigned fLgSize; // This is always in the range [4, 16], so it really only needs 4 bits.
32 32
33 struct Block; 33 struct Block;
34 Block* fBlock; 34 Block* fBlock;
35 }; 35 };
36 36
37 #endif//SkVarAlloc_DEFINED 37 #endif//SkVarAlloc_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkVarAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698