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

Side by Side Diff: src/gpu/GrAllocator.h

Issue 1610823002: Consolidate SK_CRASH and sk_throw into SK_ABORT (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: windows fix Created 4 years, 11 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 | « src/device/xps/SkXPSDevice.cpp ('k') | src/gpu/GrTRecorder.h » ('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 2010 Google Inc. 2 * Copyright 2010 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 GrAllocator_DEFINED 8 #ifndef GrAllocator_DEFINED
9 #define GrAllocator_DEFINED 9 #define GrAllocator_DEFINED
10 10
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 }; 382 };
383 383
384 template <typename T> void* operator new(size_t size, GrTAllocator<T>* allocator ) { 384 template <typename T> void* operator new(size_t size, GrTAllocator<T>* allocator ) {
385 return allocator->fAllocator.push_back(); 385 return allocator->fAllocator.push_back();
386 } 386 }
387 387
388 // Skia doesn't use C++ exceptions but it may be compiled with them enabled. Hav ing an op delete 388 // Skia doesn't use C++ exceptions but it may be compiled with them enabled. Hav ing an op delete
389 // to match the op new silences warnings about missing op delete when a construc tor throws an 389 // to match the op new silences warnings about missing op delete when a construc tor throws an
390 // exception. 390 // exception.
391 template <typename T> void operator delete(void*, GrTAllocator<T>*) { 391 template <typename T> void operator delete(void*, GrTAllocator<T>*) {
392 SK_CRASH(); 392 SK_ABORT("Invalid Operation");
393 } 393 }
394 394
395 #define GrNEW_APPEND_TO_ALLOCATOR(allocator_ptr, type_name, args) \ 395 #define GrNEW_APPEND_TO_ALLOCATOR(allocator_ptr, type_name, args) \
396 new (allocator_ptr) type_name args 396 new (allocator_ptr) type_name args
397 397
398 #endif 398 #endif
OLDNEW
« no previous file with comments | « src/device/xps/SkXPSDevice.cpp ('k') | src/gpu/GrTRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698