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

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

Issue 2053823002: Make SkBlitter hierarchy explicit about what needs to be implemented. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 | « src/core/SkBlitter.h ('k') | src/core/SkBlitter_Sprite.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 * 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
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
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 }
OLDNEW
« no previous file with comments | « src/core/SkBlitter.h ('k') | src/core/SkBlitter_Sprite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698