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/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: 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') | src/pdf/SkPDFShader.cpp » ('J')
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 static SkPDFObject* GetPDFShader(const SkShader& shader, 43 static SkPDFObject* GetPDFShader(const SkShader& shader,
44 const SkMatrix& matrix, 44 const SkMatrix& matrix,
45 const SkIRect& surfaceBBox, 45 const SkIRect& surfaceBBox,
46 SkScalar rasterScale); 46 SkScalar rasterScale);
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 SkPDFObject* fSelf;
mtklein 2015/01/22 15:54:30 This is just aching for a comment. My first thoug
53 54
54 // This is an internal method. 55 // This is an internal method.
55 // CanonicalShadersMutex() should already be acquired. 56 // CanonicalShadersMutex() should already be acquired.
56 // This also takes ownership of shaderState. 57 // This also takes ownership of shaderState.
57 static SkPDFObject* GetPDFShaderByState(State* shaderState); 58 static SkPDFObject* GetPDFShaderByState(State* shaderState);
58 static SkPDFObject* AddToCanonIfValid(SkPDFShader*);
59 static void RemoveFromCanonIfValid(SkPDFShader*);
60 59
61 SkPDFShader(State*); 60 SkPDFShader(State* s);
62 virtual ~SkPDFShader(); 61 ~SkPDFShader();
63
64 virtual bool isValid() = 0;
65 virtual SkPDFObject* toPDFObject() = 0;
66 }; 62 };
67 63
68 #endif 64 #endif
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFShader.cpp » ('j') | src/pdf/SkPDFShader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698