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

Unified Diff: cc/resources/scoped_gpu_raster.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.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/resource_update_controller_unittest.cc ('k') | cc/resources/scoped_gpu_raster_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/scoped_gpu_raster.cc
diff --git a/cc/resources/scoped_gpu_raster.cc b/cc/resources/scoped_gpu_raster.cc
index 9d1dfe53dc603cbdd5a3e60ee2cb96ac8edee26b..2f5c5c9c3426a42eca7532cb8919611884a983d1 100644
--- a/cc/resources/scoped_gpu_raster.cc
+++ b/cc/resources/scoped_gpu_raster.cc
@@ -34,11 +34,14 @@ void ScopedGpuRaster::BeginGpuRaster() {
}
void ScopedGpuRaster::EndGpuRaster() {
- GLES2Interface* gl = context_provider_->ContextGL();
-
class GrContext* gr_context = context_provider_->GrContext();
gr_context->flush();
+ GLES2Interface* gl = context_provider_->ContextGL();
+
+ // Restore default GL unpack alignment. TextureUploader expects this.
+ gl->PixelStorei(GL_UNPACK_ALIGNMENT, 4);
+
// TODO(alokp): Use a trace macro to push/pop markers.
// Using push/pop functions directly incurs cost to evaluate function
// arguments even when tracing is disabled.
« no previous file with comments | « cc/resources/resource_update_controller_unittest.cc ('k') | cc/resources/scoped_gpu_raster_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698