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

Unified Diff: src/gpu/GrAtlas.cpp

Issue 27343002: Second wave of Win64 warning cleanup (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: switched count_glyphs back to int 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrAtlas.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlas.cpp
===================================================================
--- src/gpu/GrAtlas.cpp (revision 11775)
+++ src/gpu/GrAtlas.cpp (working copy)
@@ -62,16 +62,14 @@
delete fRects;
}
-static void adjust_for_offset(GrIPoint16* loc, const GrIPoint16& offset) {
+static inline void adjust_for_offset(GrIPoint16* loc, const GrIPoint16& offset) {
loc->fX += offset.fX * GR_ATLAS_WIDTH;
loc->fY += offset.fY * GR_ATLAS_HEIGHT;
}
-static uint8_t* zero_fill(uint8_t* ptr, int count) {
- while (--count >= 0) {
- *ptr++ = 0;
- }
- return ptr;
+static inline uint8_t* zero_fill(uint8_t* ptr, size_t count) {
+ sk_bzero(ptr, count);
+ return ptr + count;
}
bool GrPlot::addSubImage(int width, int height, const void* image,
@@ -128,7 +126,7 @@
fTexture = NULL;
// set up allocated plots
- int bpp = GrBytesPerPixel(fPixelConfig);
+ size_t bpp = GrBytesPerPixel(fPixelConfig);
fPlots = SkNEW_ARRAY(GrPlot, (GR_PLOT_WIDTH*GR_PLOT_HEIGHT));
fFreePlots = NULL;
GrPlot* currPlot = fPlots;
« no previous file with comments | « src/gpu/GrAtlas.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698