OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrGpuResourcePriv.h" | 9 #include "GrGpuResourcePriv.h" |
10 #include "GrLayerAtlas.h" | 10 #include "GrLayerAtlas.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 GrSurfaceDesc desc; | 63 GrSurfaceDesc desc; |
64 desc.fFlags = fFlags; | 64 desc.fFlags = fFlags; |
65 desc.fWidth = fBackingTextureSize.width(); | 65 desc.fWidth = fBackingTextureSize.width(); |
66 desc.fHeight = fBackingTextureSize.height(); | 66 desc.fHeight = fBackingTextureSize.height(); |
67 desc.fConfig = fPixelConfig; | 67 desc.fConfig = fPixelConfig; |
68 | 68 |
69 fTexture.reset(fTexProvider->createTexture(desc, true, nullptr, 0)); | 69 fTexture.reset(fTexProvider->createTexture(desc, true, nullptr, 0)); |
70 | 70 |
71 fTexture->resourcePriv().setUniqueKey(get_layer_atlas_key()); | 71 fTexture->resourcePriv().setUniqueKey(get_layer_atlas_key()); |
| 72 |
| 73 // This was written to but will have a unique key |
| 74 fTexture->fException2 = true; |
72 } | 75 } |
73 | 76 |
74 GrLayerAtlas::GrLayerAtlas(GrTextureProvider* texProvider, GrPixelConfig config,
| 77 GrLayerAtlas::GrLayerAtlas(GrTextureProvider* texProvider, GrPixelConfig config,
|
75 GrSurfaceFlags flags, | 78 GrSurfaceFlags flags, |
76 const SkISize& backingTextureSize, | 79 const SkISize& backingTextureSize, |
77 int numPlotsX, int numPlotsY) { | 80 int numPlotsX, int numPlotsY) { |
78 fTexProvider = texProvider; | 81 fTexProvider = texProvider; |
79 fPixelConfig = config; | 82 fPixelConfig = config; |
80 fFlags = flags; | 83 fFlags = flags; |
81 fBackingTextureSize = backingTextureSize; | 84 fBackingTextureSize = backingTextureSize; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 usage->appendPlot(plot); | 164 usage->appendPlot(plot); |
162 return plot; | 165 return plot; |
163 } | 166 } |
164 plotIter.next(); | 167 plotIter.next(); |
165 } | 168 } |
166 | 169 |
167 // If the above fails, then the current plot list has no room | 170 // If the above fails, then the current plot list has no room |
168 return nullptr; | 171 return nullptr; |
169 } | 172 } |
170 | 173 |
OLD | NEW |