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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 965223002: gpu: gpu decoder sets viewport size same to the size of the default framebuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 8c24d3cd1df5f8e04a458d173ec5106f5d3971bd..06842ec581a726beba1290d20ea93654c748e450 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2681,6 +2681,10 @@ bool GLES2DecoderImpl::Initialize(
return false;
}
+ // |size| is set if the GL context is offscreen.
+ state_.viewport_width = size.width();
+ state_.viewport_height = size.height();
+
// Allocate the offscreen saved color texture.
DCHECK(offscreen_saved_color_format_);
offscreen_saved_color_texture_->AllocateStorage(
@@ -2742,9 +2746,6 @@ bool GLES2DecoderImpl::Initialize(
return false;
}
- state_.viewport_width = size.width();
- state_.viewport_height = size.height();
no sievers 2015/03/02 20:37:12 What's the bug? We call InitState() in line 2758,
dshwang 2015/03/03 09:20:29 There's no bug. I just confused why onscreen viewp
-
GLint viewport_params[4] = { 0 };
glGetIntegerv(GL_MAX_VIEWPORT_DIMS, viewport_params);
viewport_max_width_ = viewport_params[0];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698