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

Side by Side Diff: src/gpu/GrSWMaskHelper.cpp

Issue 798723002: More win64 warning fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@size_t
Patch Set: off_t is signed Created 6 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
« no previous file with comments | « src/gpu/GrSWMaskHelper.h ('k') | src/gpu/gl/GrGLPathRendering.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 2012 Google Inc. 2 * Copyright 2012 Google Inc.
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 "GrSWMaskHelper.h" 8 #include "GrSWMaskHelper.h"
9 9
10 #include "GrDrawState.h" 10 #include "GrDrawState.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 #endif 245 #endif
246 246
247 desc.fConfig = fmt_to_config(fCompressedFormat); 247 desc.fConfig = fmt_to_config(fCompressedFormat);
248 SkASSERT(fContext->getGpu()->caps()->isConfigTexturable(desc.fConfig)); 248 SkASSERT(fContext->getGpu()->caps()->isConfigTexturable(desc.fConfig));
249 } 249 }
250 250
251 return fContext->refScratchTexture(desc, GrContext::kApprox_ScratchTexMatch) ; 251 return fContext->refScratchTexture(desc, GrContext::kApprox_ScratchTexMatch) ;
252 } 252 }
253 253
254 void GrSWMaskHelper::sendTextureData(GrTexture *texture, const GrSurfaceDesc& de sc, 254 void GrSWMaskHelper::sendTextureData(GrTexture *texture, const GrSurfaceDesc& de sc,
255 const void *data, int rowbytes) { 255 const void *data, size_t rowbytes) {
256 // If we aren't reusing scratch textures we don't need to flush before 256 // If we aren't reusing scratch textures we don't need to flush before
257 // writing since no one else will be using 'texture' 257 // writing since no one else will be using 'texture'
258 bool reuseScratch = fContext->getGpu()->caps()->reuseScratchTextures(); 258 bool reuseScratch = fContext->getGpu()->caps()->reuseScratchTextures();
259 259
260 // Since we're uploading to it, and it's compressed, 'texture' shouldn't 260 // Since we're uploading to it, and it's compressed, 'texture' shouldn't
261 // have a render target. 261 // have a render target.
262 SkASSERT(NULL == texture->asRenderTarget()); 262 SkASSERT(NULL == texture->asRenderTarget());
263 263
264 texture->writePixels(0, 0, desc.fWidth, desc.fHeight, 264 texture->writePixels(0, 0, desc.fWidth, desc.fHeight,
265 desc.fConfig, data, rowbytes, 265 desc.fConfig, data, rowbytes,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 maskMatrix.preConcat(drawState->getViewMatrix()); 371 maskMatrix.preConcat(drawState->getViewMatrix());
372 372
373 drawState->addCoverageProcessor( 373 drawState->addCoverageProcessor(
374 GrSimpleTextureEffect::Create(texture, 374 GrSimpleTextureEffect::Create(texture,
375 maskMatrix, 375 maskMatrix,
376 GrTextureParams::kNone_Fi lterMode, 376 GrTextureParams::kNone_Fi lterMode,
377 kPosition_GrCoordSet))->u nref(); 377 kPosition_GrCoordSet))->u nref();
378 378
379 target->drawSimpleRect(drawState, color, dstRect); 379 target->drawSimpleRect(drawState, color, dstRect);
380 } 380 }
OLDNEW
« no previous file with comments | « src/gpu/GrSWMaskHelper.h ('k') | src/gpu/gl/GrGLPathRendering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698