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

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

Issue 86483002: Revert "Revert "remove kA1_Config, as it is no longer supported"" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add change to picture version Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | src/core/SkBlitter_A1.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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 #include "SkBlitter.h" 10 #include "SkBlitter.h"
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 * The endContext() call is made by the blitter (assuming setContext did 938 * The endContext() call is made by the blitter (assuming setContext did
939 * not fail) in its destructor. 939 * not fail) in its destructor.
940 */ 940 */
941 if (shader && !shader->setContext(device, *paint, matrix)) { 941 if (shader && !shader->setContext(device, *paint, matrix)) {
942 SK_PLACEMENT_NEW(blitter, SkNullBlitter, storage, storageSize); 942 SK_PLACEMENT_NEW(blitter, SkNullBlitter, storage, storageSize);
943 return blitter; 943 return blitter;
944 } 944 }
945 945
946 946
947 switch (device.config()) { 947 switch (device.config()) {
948 case SkBitmap::kA1_Config:
949 SK_PLACEMENT_NEW_ARGS(blitter, SkA1_Blitter,
950 storage, storageSize, (device, *paint));
951 break;
952
953 case SkBitmap::kA8_Config: 948 case SkBitmap::kA8_Config:
954 if (drawCoverage) { 949 if (drawCoverage) {
955 SkASSERT(NULL == shader); 950 SkASSERT(NULL == shader);
956 SkASSERT(NULL == paint->getXfermode()); 951 SkASSERT(NULL == paint->getXfermode());
957 SK_PLACEMENT_NEW_ARGS(blitter, SkA8_Coverage_Blitter, 952 SK_PLACEMENT_NEW_ARGS(blitter, SkA8_Coverage_Blitter,
958 storage, storageSize, (device, *paint)); 953 storage, storageSize, (device, *paint));
959 } else if (shader) { 954 } else if (shader) {
960 SK_PLACEMENT_NEW_ARGS(blitter, SkA8_Shader_Blitter, 955 SK_PLACEMENT_NEW_ARGS(blitter, SkA8_Shader_Blitter,
961 storage, storageSize, (device, *paint)); 956 storage, storageSize, (device, *paint));
962 } else { 957 } else {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 1011
1017 fShader->ref(); 1012 fShader->ref();
1018 fShaderFlags = fShader->getFlags(); 1013 fShaderFlags = fShader->getFlags();
1019 } 1014 }
1020 1015
1021 SkShaderBlitter::~SkShaderBlitter() { 1016 SkShaderBlitter::~SkShaderBlitter() {
1022 SkASSERT(fShader->setContextHasBeenCalled()); 1017 SkASSERT(fShader->setContextHasBeenCalled());
1023 fShader->endContext(); 1018 fShader->endContext();
1024 fShader->unref(); 1019 fShader->unref();
1025 } 1020 }
OLDNEW
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | src/core/SkBlitter_A1.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698