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

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

Issue 2244293002: Revert of increase small allocator limit to encompass compose shader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | 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 #ifndef SkImagePriv_DEFINED 8 #ifndef SkImagePriv_DEFINED
9 #define SkImagePriv_DEFINED 9 #define SkImagePriv_DEFINED
10 10
11 #include "SkImage.h" 11 #include "SkImage.h"
12 #include "SkSmallAllocator.h" 12 #include "SkSmallAllocator.h"
13 #include "SkSurface.h" 13 #include "SkSurface.h"
14 14
15 enum SkCopyPixelsMode { 15 enum SkCopyPixelsMode {
16 kIfMutable_SkCopyPixelsMode, //!< only copy src pixels if they are marked m utable 16 kIfMutable_SkCopyPixelsMode, //!< only copy src pixels if they are marked m utable
17 kAlways_SkCopyPixelsMode, //!< always copy src pixels (even if they are marked immutable) 17 kAlways_SkCopyPixelsMode, //!< always copy src pixels (even if they are marked immutable)
18 kNever_SkCopyPixelsMode, //!< never copy src pixels (even if they are m arked mutable) 18 kNever_SkCopyPixelsMode, //!< never copy src pixels (even if they are m arked mutable)
19 }; 19 };
20 20
21 enum {kSkBlitterContextSize = 5300}; // minimum required for compose shader bli tter 21 enum {kSkBlitterContextSize = 3332};
22 22
23 // Commonly used allocator. It currently is only used to allocate up to 3 object s. The total 23 // Commonly used allocator. It currently is only used to allocate up to 3 object s. The total
24 // bytes requested is calculated using one of our large shaders, its context siz e plus the size of 24 // bytes requested is calculated using one of our large shaders, its context siz e plus the size of
25 // an Sk3DBlitter in SkDraw.cpp 25 // an Sk3DBlitter in SkDraw.cpp
26 // Note that some contexts may contain other contexts (e.g. for compose shaders) , but we've not 26 // Note that some contexts may contain other contexts (e.g. for compose shaders) , but we've not
27 // yet found a situation where the size below isn't big enough. 27 // yet found a situation where the size below isn't big enough.
28 typedef SkSmallAllocator<3, kSkBlitterContextSize> SkTBlitterAllocator; 28 typedef SkSmallAllocator<3, kSkBlitterContextSize> SkTBlitterAllocator;
29 29
30 // If alloc is non-nullptr, it will be used to allocate the returned SkShader, a nd MUST outlive 30 // If alloc is non-nullptr, it will be used to allocate the returned SkShader, a nd MUST outlive
31 // the SkShader. 31 // the SkShader.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 extern void SkTextureImageApplyBudgetedDecision(SkImage* textureImage); 71 extern void SkTextureImageApplyBudgetedDecision(SkImage* textureImage);
72 72
73 // Update the texture wrapped by an image created with NewTexture. This 73 // Update the texture wrapped by an image created with NewTexture. This
74 // is called when a surface and image share the same GrTexture and the 74 // is called when a surface and image share the same GrTexture and the
75 // surface needs to perform a copy-on-write 75 // surface needs to perform a copy-on-write
76 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture); 76 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture);
77 77
78 GrTexture* GrDeepCopyTexture(GrTexture* src, SkBudgeted); 78 GrTexture* GrDeepCopyTexture(GrTexture* src, SkBudgeted);
79 79
80 #endif 80 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698