OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBlitter.h" | 8 #include "SkBlitter.h" |
9 #include "SkAntiRun.h" | 9 #include "SkAntiRun.h" |
10 #include "SkColor.h" | 10 #include "SkColor.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 | 32 |
33 SkShader::Context* SkBlitter::getShaderContext() const { | 33 SkShader::Context* SkBlitter::getShaderContext() const { |
34 return nullptr; | 34 return nullptr; |
35 } | 35 } |
36 | 36 |
37 const SkPixmap* SkBlitter::justAnOpaqueColor(uint32_t* value) { | 37 const SkPixmap* SkBlitter::justAnOpaqueColor(uint32_t* value) { |
38 return nullptr; | 38 return nullptr; |
39 } | 39 } |
40 | 40 |
| 41 /* |
41 void SkBlitter::blitH(int x, int y, int width) { | 42 void SkBlitter::blitH(int x, int y, int width) { |
42 SkDEBUGFAIL("unimplemented"); | 43 SkDEBUGFAIL("unimplemented"); |
43 } | 44 } |
44 | 45 |
| 46 |
45 void SkBlitter::blitAntiH(int x, int y, const SkAlpha antialias[], | 47 void SkBlitter::blitAntiH(int x, int y, const SkAlpha antialias[], |
46 const int16_t runs[]) { | 48 const int16_t runs[]) { |
47 SkDEBUGFAIL("unimplemented"); | 49 SkDEBUGFAIL("unimplemented"); |
48 } | 50 } |
| 51 */ |
49 | 52 |
50 void SkBlitter::blitV(int x, int y, int height, SkAlpha alpha) { | 53 void SkBlitter::blitV(int x, int y, int height, SkAlpha alpha) { |
51 if (alpha == 255) { | 54 if (alpha == 255) { |
52 this->blitRect(x, y, 1, height); | 55 this->blitRect(x, y, 1, height); |
53 } else { | 56 } else { |
54 int16_t runs[2]; | 57 int16_t runs[2]; |
55 runs[0] = 1; | 58 runs[0] = 1; |
56 runs[1] = 0; | 59 runs[1] = 0; |
57 | 60 |
58 while (--height >= 0) { | 61 while (--height >= 0) { |
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 fShaderContext->~Context(); | 1005 fShaderContext->~Context(); |
1003 SkShader::Context* ctx = fShader->createContext(rec, (void*)fShaderContext); | 1006 SkShader::Context* ctx = fShader->createContext(rec, (void*)fShaderContext); |
1004 if (nullptr == ctx) { | 1007 if (nullptr == ctx) { |
1005 // Need a valid context in fShaderContext's storage, so we can later (or
our caller) call | 1008 // Need a valid context in fShaderContext's storage, so we can later (or
our caller) call |
1006 // the in-place destructor. | 1009 // the in-place destructor. |
1007 new (fShaderContext) SkZeroShaderContext(*fShader, rec); | 1010 new (fShaderContext) SkZeroShaderContext(*fShader, rec); |
1008 return false; | 1011 return false; |
1009 } | 1012 } |
1010 return true; | 1013 return true; |
1011 } | 1014 } |
OLD | NEW |