OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
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 | 9 |
10 #include "SkBlitter.h" | 10 #include "SkBlitter.h" |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 void* detach() { | 773 void* detach() { |
774 void* obj = fObj; | 774 void* obj = fObj; |
775 fObj = NULL; | 775 fObj = NULL; |
776 return obj; | 776 return obj; |
777 } | 777 } |
778 | 778 |
779 private: | 779 private: |
780 void* fObj; | 780 void* fObj; |
781 Proc fProc; | 781 Proc fProc; |
782 }; | 782 }; |
| 783 #define SkAutoCallProc(...) SK_REQUIRE_LOCAL_VAR(SkAutoCallProc) |
783 | 784 |
784 static void destroy_blitter(void* blitter) { | 785 static void destroy_blitter(void* blitter) { |
785 ((SkBlitter*)blitter)->~SkBlitter(); | 786 ((SkBlitter*)blitter)->~SkBlitter(); |
786 } | 787 } |
787 | 788 |
788 static void delete_blitter(void* blitter) { | 789 static void delete_blitter(void* blitter) { |
789 SkDELETE((SkBlitter*)blitter); | 790 SkDELETE((SkBlitter*)blitter); |
790 } | 791 } |
791 | 792 |
792 static bool just_solid_color(const SkPaint& paint) { | 793 static bool just_solid_color(const SkPaint& paint) { |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 | 1016 |
1016 fShader->ref(); | 1017 fShader->ref(); |
1017 fShaderFlags = fShader->getFlags(); | 1018 fShaderFlags = fShader->getFlags(); |
1018 } | 1019 } |
1019 | 1020 |
1020 SkShaderBlitter::~SkShaderBlitter() { | 1021 SkShaderBlitter::~SkShaderBlitter() { |
1021 SkASSERT(fShader->setContextHasBeenCalled()); | 1022 SkASSERT(fShader->setContextHasBeenCalled()); |
1022 fShader->endContext(); | 1023 fShader->endContext(); |
1023 fShader->unref(); | 1024 fShader->unref(); |
1024 } | 1025 } |
OLD | NEW |