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

Side by Side Diff: src/pdf/SkPDFShader.h

Issue 862113004: Simplify SkPDFShader class. Now invalid objects are never created. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: again Created 5 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 | « no previous file | src/pdf/SkPDFShader.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 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 #ifndef SkPDFShader_DEFINED 10 #ifndef SkPDFShader_DEFINED
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 class State; 48 class State;
49 bool equals(const SkPDFShader::State&) const; 49 bool equals(const SkPDFShader::State&) const;
50 50
51 protected: 51 protected:
52 SkAutoTDelete<const State> fShaderState; 52 SkAutoTDelete<const State> fShaderState;
53 53
54 // This is an internal method. 54 // This is an internal method.
55 // CanonicalShadersMutex() should already be acquired. 55 // CanonicalShadersMutex() should already be acquired.
56 // This also takes ownership of shaderState. 56 // This also takes ownership of shaderState.
57 static SkPDFObject* GetPDFShaderByState(State* shaderState); 57 static SkPDFObject* GetPDFShaderByState(SkAutoTDelete<SkPDFShader::State>*);
58 static SkPDFObject* AddToCanonIfValid(SkPDFShader*);
59 static void RemoveFromCanonIfValid(SkPDFShader*);
60 58
61 SkPDFShader(State*); 59 SkPDFShader(State*);
62 virtual ~SkPDFShader(); 60 virtual ~SkPDFShader();
63 61
64 virtual bool isValid() = 0;
65 virtual SkPDFObject* toPDFObject() = 0; 62 virtual SkPDFObject* toPDFObject() = 0;
66 }; 63 };
67 64
68 #endif 65 #endif
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698