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

Side by Side Diff: src/core/SkBlitter.cpp

Issue 72603005: Guard against most unintentionally ephemeral SkAutoFoo instantiations. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: undo autoasciitolc Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « samplecode/SampleLayers.cpp ('k') | src/core/SkCanvas.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 /* 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
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
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 }
OLDNEW
« no previous file with comments | « samplecode/SampleLayers.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698