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

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

Issue 18978014: Working plumb of image scaling: (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: nits from robert Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkBitmapFilter.cpp ('k') | src/core/SkBitmapProcState.h » ('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 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 #include "SkBitmapProcShader.h" 8 #include "SkBitmapProcShader.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkFlattenableBuffers.h" 10 #include "SkFlattenableBuffers.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 flags |= kConstInY16_Flag; 135 flags |= kConstInY16_Flag;
136 } 136 }
137 } 137 }
138 138
139 fFlags = flags; 139 fFlags = flags;
140 return true; 140 return true;
141 } 141 }
142 142
143 void SkBitmapProcShader::endContext() { 143 void SkBitmapProcShader::endContext() {
144 fState.fOrigBitmap.unlockPixels(); 144 fState.fOrigBitmap.unlockPixels();
145 fState.endContext();
145 this->INHERITED::endContext(); 146 this->INHERITED::endContext();
146 } 147 }
147 148
148 #define BUF_MAX 128 149 #define BUF_MAX 128
149 150
150 #define TEST_BUFFER_OVERRITEx 151 #define TEST_BUFFER_OVERRITEx
151 152
152 #ifdef TEST_BUFFER_OVERRITE 153 #ifdef TEST_BUFFER_OVERRITE
153 #define TEST_BUFFER_EXTRA 32 154 #define TEST_BUFFER_EXTRA 32
154 #define TEST_PATTERN 0x88888888 155 #define TEST_PATTERN 0x88888888
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 if (NULL == texture) { 359 if (NULL == texture) {
359 SkDebugf("Couldn't convert bitmap to texture.\n"); 360 SkDebugf("Couldn't convert bitmap to texture.\n");
360 return NULL; 361 return NULL;
361 } 362 }
362 363
363 GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix, params) ; 364 GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix, params) ;
364 GrUnlockAndUnrefCachedBitmapTexture(texture); 365 GrUnlockAndUnrefCachedBitmapTexture(texture);
365 return effect; 366 return effect;
366 } 367 }
367 #endif 368 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapFilter.cpp ('k') | src/core/SkBitmapProcState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698