Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| OLD | NEW |