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

Side by Side Diff: src/gpu/effects/GrTextureStripAtlas.cpp

Issue 248473006: stop using deprecated bitmap::config for gpu (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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/gpu/SkGr.cpp ('k') | src/image/SkSurface_Gpu.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 2012 Google Inc. 3 * Copyright 2012 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 #include "GrTextureStripAtlas.h" 9 #include "GrTextureStripAtlas.h"
10 #include "SkPixelRef.h" 10 #include "SkPixelRef.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 fKeyTable.insert(index, 1, &row); 151 fKeyTable.insert(index, 1, &row);
152 rowNumber = static_cast<int>(row - fRows); 152 rowNumber = static_cast<int>(row - fRows);
153 153
154 SkAutoLockPixels lock(data); 154 SkAutoLockPixels lock(data);
155 155
156 // Pass in the kDontFlush flag, since we know we're writing to a part of this texture 156 // Pass in the kDontFlush flag, since we know we're writing to a part of this texture
157 // that is not currently in use 157 // that is not currently in use
158 fDesc.fContext->writeTexturePixels(fTexture, 158 fDesc.fContext->writeTexturePixels(fTexture,
159 0, rowNumber * fDesc.fRowHeight, 159 0, rowNumber * fDesc.fRowHeight,
160 fDesc.fWidth, fDesc.fRowHeight, 160 fDesc.fWidth, fDesc.fRowHeight,
161 SkBitmapConfig2GrPixelConfig(data.con fig()), 161 SkImageInfo2GrPixelConfig(data.info() ),
162 data.getPixels(), 162 data.getPixels(),
163 data.rowBytes(), 163 data.rowBytes(),
164 GrContext::kDontFlush_PixelOpsFlag); 164 GrContext::kDontFlush_PixelOpsFlag);
165 } 165 }
166 166
167 SkASSERT(rowNumber >= 0); 167 SkASSERT(rowNumber >= 0);
168 VALIDATE; 168 VALIDATE;
169 return rowNumber; 169 return rowNumber;
170 } 170 }
171 171
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 // If we have locked rows, we should have a locked texture, otherwise 340 // If we have locked rows, we should have a locked texture, otherwise
341 // it should be unlocked 341 // it should be unlocked
342 if (fLockedRows == 0) { 342 if (fLockedRows == 0) {
343 SkASSERT(NULL == fTexture); 343 SkASSERT(NULL == fTexture);
344 } else { 344 } else {
345 SkASSERT(NULL != fTexture); 345 SkASSERT(NULL != fTexture);
346 } 346 }
347 } 347 }
348 #endif 348 #endif
OLDNEW
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698