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

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

Issue 1620333002: Revert of Consolidate SK_CRASH and sk_throw into SK_ABORT (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/gpu/GrAllocator.h ('k') | src/pathops/SkPathOpsDebug.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 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 GrTRecorder_DEFINED 8 #ifndef GrTRecorder_DEFINED
9 #define GrTRecorder_DEFINED 9 #define GrTRecorder_DEFINED
10 10
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 void* operator new(size_t size, GrTRecorder<TBase, TAlign>& recorder, 371 void* operator new(size_t size, GrTRecorder<TBase, TAlign>& recorder,
372 const GrTRecorderAllocWrapper<TItem>& wrapper) { 372 const GrTRecorderAllocWrapper<TItem>& wrapper) {
373 SkASSERT(size == sizeof(TItem)); 373 SkASSERT(size == sizeof(TItem));
374 return recorder.template alloc_back<TItem>(wrapper.fDataLength); 374 return recorder.template alloc_back<TItem>(wrapper.fDataLength);
375 } 375 }
376 376
377 template <typename TBase, typename TAlign, typename TItem> 377 template <typename TBase, typename TAlign, typename TItem>
378 void operator delete(void*, GrTRecorder<TBase, TAlign>&, const GrTRecorderAllocW rapper<TItem>&) { 378 void operator delete(void*, GrTRecorder<TBase, TAlign>&, const GrTRecorderAllocW rapper<TItem>&) {
379 // We only provide an operator delete to work around compiler warnings that can come 379 // We only provide an operator delete to work around compiler warnings that can come
380 // up for an unmatched operator new when compiling with exceptions. 380 // up for an unmatched operator new when compiling with exceptions.
381 SK_ABORT("Invalid Operation"); 381 SK_CRASH();
382 } 382 }
383 383
384 #define GrNEW_APPEND_TO_RECORDER(recorder, type_name, args) \ 384 #define GrNEW_APPEND_TO_RECORDER(recorder, type_name, args) \
385 (new (recorder, GrTRecorderAllocWrapper<type_name>()) type_name args) 385 (new (recorder, GrTRecorderAllocWrapper<type_name>()) type_name args)
386 386
387 #define GrNEW_APPEND_WITH_DATA_TO_RECORDER(recorder, type_name, args, size_of_da ta) \ 387 #define GrNEW_APPEND_WITH_DATA_TO_RECORDER(recorder, type_name, args, size_of_da ta) \
388 (new (recorder, GrTRecorderAllocWrapper<type_name>(recorder, size_of_data)) type_name args) 388 (new (recorder, GrTRecorderAllocWrapper<type_name>(recorder, size_of_data)) type_name args)
389 389
390 #endif 390 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAllocator.h ('k') | src/pathops/SkPathOpsDebug.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698