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

Unified Diff: gpu/command_buffer/client/client_context_state.cc

Issue 2558933003: Cache GL's viewport on the GPU command buffer client side. (Closed)
Patch Set: fix Created 4 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 | « gpu/command_buffer/client/client_context_state.h ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/client_context_state.cc
diff --git a/gpu/command_buffer/client/client_context_state.cc b/gpu/command_buffer/client/client_context_state.cc
index df81f30a264b483518de80cf9c4b33131a3e1e89..132142383bddbc1ee31a5f59c0213c7feace7caf 100644
--- a/gpu/command_buffer/client/client_context_state.cc
+++ b/gpu/command_buffer/client/client_context_state.cc
@@ -4,6 +4,8 @@
#include "gpu/command_buffer/client/client_context_state.h"
+#include "base/logging.h"
+
namespace gpu {
namespace gles2 {
@@ -13,6 +15,17 @@ ClientContextState::ClientContextState() {
ClientContextState::~ClientContextState() {
}
+void ClientContextState::SetViewport(
+ GLint x, GLint y, GLsizei width, GLsizei height) {
+ DCHECK_LE(0, width);
+ DCHECK_LE(0, height);
+
+ viewport_x = x;
+ viewport_y = y;
+ viewport_width = width;
+ viewport_height = height;
+}
+
// Include the auto-generated part of this file. We split this because it means
// we can easily edit the non-auto generated parts right here in this file
// instead of having to edit some template or the code generator.
« no previous file with comments | « gpu/command_buffer/client/client_context_state.h ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698