Chromium Code Reviews| Index: cc/resources/texture_uploader.cc |
| diff --git a/cc/resources/texture_uploader.cc b/cc/resources/texture_uploader.cc |
| index 9526fcb9238bdf5f1d4591aab7184c544d0022f2..cc0ec82a19bbfef49ff13add80d8b595db356ab8 100644 |
| --- a/cc/resources/texture_uploader.cc |
| +++ b/cc/resources/texture_uploader.cc |
| @@ -196,7 +196,7 @@ void TextureUploader::UploadWithTexSubImage(const uint8* image, |
| const uint8* pixel_source; |
| unsigned bytes_per_pixel = BitsPerPixel(format) / 8; |
| // Use 4-byte row alignment (OpenGL default) for upload performance. |
| - // Assuming that GL_UNPACK_ALIGNMENT has not changed from default. |
| + // Assuming that GL_UNPACK_ALIGNMENT = 4 is set in UploadWithMapTexSubImage. |
| unsigned upload_image_stride = |
| RoundUp(bytes_per_pixel * source_rect.width(), 4u); |
| @@ -251,7 +251,7 @@ void TextureUploader::UploadWithMapTexSubImage(const uint8* image, |
| unsigned bytes_per_pixel = BitsPerPixel(format) / 8; |
| // Use 4-byte row alignment (OpenGL default) for upload performance. |
| - // Assuming that GL_UNPACK_ALIGNMENT has not changed from default. |
| + gl_->PixelStorei(GL_UNPACK_ALIGNMENT, 4); |
|
danakj
2014/12/19 20:00:46
Should we do this when we take control of the cont
vmiura
2014/12/19 21:28:16
If there's a good spot we could do that.
Discussi
|
| unsigned upload_image_stride = |
| RoundUp(bytes_per_pixel * source_rect.width(), 4u); |