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

Unified Diff: cc/resources/texture_uploader.cc

Issue 793693003: Tile Compression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/texture_compress/texture_compress_perftest.cc ('k') | cc/resources/tile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/texture_uploader.cc
diff --git a/cc/resources/texture_uploader.cc b/cc/resources/texture_uploader.cc
index 9526fcb9238bdf5f1d4591aab7184c544d0022f2..0e3394521d4bc86e0c6f7f7e1dc127ac8aafe89d 100644
--- a/cc/resources/texture_uploader.cc
+++ b/cc/resources/texture_uploader.cc
@@ -195,6 +195,7 @@ void TextureUploader::UploadWithTexSubImage(const uint8* image,
const uint8* pixel_source;
unsigned bytes_per_pixel = BitsPerPixel(format) / 8;
+ DCHECK(bytes_per_pixel);
// Use 4-byte row alignment (OpenGL default) for upload performance.
// Assuming that GL_UNPACK_ALIGNMENT has not changed from default.
unsigned upload_image_stride =
@@ -250,6 +251,7 @@ void TextureUploader::UploadWithMapTexSubImage(const uint8* image,
gfx::Vector2d offset(source_rect.origin() - image_rect.origin());
unsigned bytes_per_pixel = BitsPerPixel(format) / 8;
+ DCHECK(bytes_per_pixel);
// Use 4-byte row alignment (OpenGL default) for upload performance.
// Assuming that GL_UNPACK_ALIGNMENT has not changed from default.
unsigned upload_image_stride =
« no previous file with comments | « cc/resources/texture_compress/texture_compress_perftest.cc ('k') | cc/resources/tile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698