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

Side by Side Diff: src/utils/SkDeferredCanvas.cpp

Issue 27192003: Start cleaning up 64bit Win warnings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: revertedGrBytesPerPixel to returning a size_t Created 7 years, 2 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/ports/SkFontHost_win_dw.cpp ('k') | src/utils/SkDumpCanvas.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 2013 Google Inc. 3 * Copyright 2013 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 "SkDeferredCanvas.h" 9 #include "SkDeferredCanvas.h"
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void DeferredPipeController::setPlaybackCanvas(SkCanvas* canvas) { 99 void DeferredPipeController::setPlaybackCanvas(SkCanvas* canvas) {
100 fReader.setCanvas(canvas); 100 fReader.setCanvas(canvas);
101 } 101 }
102 102
103 void* DeferredPipeController::requestBlock(size_t minRequest, size_t *actual) { 103 void* DeferredPipeController::requestBlock(size_t minRequest, size_t *actual) {
104 if (fBlock) { 104 if (fBlock) {
105 // Save the previous block for later 105 // Save the previous block for later
106 PipeBlock previousBloc(fBlock, fBytesWritten); 106 PipeBlock previousBloc(fBlock, fBytesWritten);
107 fBlockList.push(previousBloc); 107 fBlockList.push(previousBloc);
108 } 108 }
109 int32_t blockSize = SkMax32(minRequest, kMinBlockSize); 109 size_t blockSize = SkTMax<size_t>(minRequest, kMinBlockSize);
110 fBlock = fAllocator.allocThrow(blockSize); 110 fBlock = fAllocator.allocThrow(blockSize);
111 fBytesWritten = 0; 111 fBytesWritten = 0;
112 *actual = blockSize; 112 *actual = blockSize;
113 return fBlock; 113 return fBlock;
114 } 114 }
115 115
116 void DeferredPipeController::notifyWritten(size_t bytes) { 116 void DeferredPipeController::notifyWritten(size_t bytes) {
117 fBytesWritten += bytes; 117 fBytesWritten += bytes;
118 } 118 }
119 119
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { 1003 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) {
1004 this->drawingCanvas()->setDrawFilter(filter); 1004 this->drawingCanvas()->setDrawFilter(filter);
1005 this->INHERITED::setDrawFilter(filter); 1005 this->INHERITED::setDrawFilter(filter);
1006 this->recordedDrawCommand(); 1006 this->recordedDrawCommand();
1007 return filter; 1007 return filter;
1008 } 1008 }
1009 1009
1010 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { 1010 SkCanvas* SkDeferredCanvas::canvasForDrawIter() {
1011 return this->drawingCanvas(); 1011 return this->drawingCanvas();
1012 } 1012 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_win_dw.cpp ('k') | src/utils/SkDumpCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698