Changeset 244297 in webkit
- Timestamp:
- Apr 15, 2019, 2:58:14 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/gpu/cocoa/GPUBufferMetal.mm (modified) (1 diff)
-
platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm (modified) (2 diffs)
-
platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r244293 r244297 1 2019-04-15 Justin Fan <justin_fan@apple.com> 2 3 Let WTF::convertSafely deduce types from arguments. 4 5 Reviewer's (Darin Adler) follow-up to https://bugs.webkit.org/show_bug.cgi?id=196793. 6 7 * platform/graphics/gpu/cocoa/GPUBufferMetal.mm: 8 (WebCore::GPUBuffer::tryCreate): 9 * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm: 10 (WebCore::GPUCommandBuffer::copyBufferToTexture): 11 (WebCore::GPUCommandBuffer::copyTextureToBuffer): 12 * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: 13 (WebCore::trySetInputStateForPipelineDescriptor): 14 1 15 2019-04-12 Ryosuke Niwa <rniwa@webkit.org> 2 16 -
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUBufferMetal.mm
r244235 r244297 67 67 // MTLBuffer size (NSUInteger) is 32 bits on some platforms. 68 68 NSUInteger size = 0; 69 if (!WTF::convertSafely <NSUInteger, uint64_t>(descriptor.size, size)) {69 if (!WTF::convertSafely(descriptor.size, size)) { 70 70 LOG(WebGPU, "GPUBuffer::tryCreate(): Buffer size is too large!"); 71 71 return nullptr; -
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm
r244235 r244297 142 142 // MTLBuffer size (NSUInteger) is 32 bits on some platforms. 143 143 NSUInteger sourceOffset = 0; 144 if (!WTF::convertSafely <NSUInteger, uint64_t>(srcBuffer.offset, sourceOffset)) {144 if (!WTF::convertSafely(srcBuffer.offset, sourceOffset)) { 145 145 LOG(WebGPU, "GPUCommandBuffer::copyBufferToTexture(): Source offset is too large!"); 146 146 return; … … 186 186 // MTLBuffer size (NSUInteger) is 32 bits on some platforms. 187 187 NSUInteger destinationOffset = 0; 188 if (!WTF::convertSafely <NSUInteger, uint64_t>(dstBuffer.offset, destinationOffset)) {188 if (!WTF::convertSafely(dstBuffer.offset, destinationOffset)) { 189 189 LOG(WebGPU, "GPUCommandBuffer::copyTextureToBuffer(): Destination offset is too large!"); 190 190 return; -
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm
r244235 r244297 344 344 // FIXME: Ensure offset < buffer's stride + format's data size. 345 345 NSUInteger attributeOffset = 0; 346 if (!WTF::convertSafely <NSUInteger, uint64_t>(attributes[i].offset, attributeOffset)) {346 if (!WTF::convertSafely(attributes[i].offset, attributeOffset)) { 347 347 LOG(WebGPU, "%s: Buffer offset for vertex attribute %u is too large!", functionName, location); 348 348 return false; … … 366 366 } 367 367 NSUInteger inputStride = 0; 368 if (!WTF::convertSafely <NSUInteger, uint64_t>(inputs[j].stride, inputStride)) {368 if (!WTF::convertSafely(inputs[j].stride, inputStride)) { 369 369 LOG(WebGPU, "%s: Stride for vertex buffer slot %d is too large!", functionName, slot); 370 370 return false;
Note:
See TracChangeset
for help on using the changeset viewer.