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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/client/client_context_state.h" 5 #include "gpu/command_buffer/client/client_context_state.h"
6 6
7 #include "base/logging.h"
8
7 namespace gpu { 9 namespace gpu {
8 namespace gles2 { 10 namespace gles2 {
9 11
10 ClientContextState::ClientContextState() { 12 ClientContextState::ClientContextState() {
11 } 13 }
12 14
13 ClientContextState::~ClientContextState() { 15 ClientContextState::~ClientContextState() {
14 } 16 }
15 17
18 void ClientContextState::SetViewport(
19 GLint x, GLint y, GLsizei width, GLsizei height) {
20 DCHECK_LE(0, width);
21 DCHECK_LE(0, height);
22
23 viewport_x = x;
24 viewport_y = y;
25 viewport_width = width;
26 viewport_height = height;
27 }
28
16 // Include the auto-generated part of this file. We split this because it means 29 // Include the auto-generated part of this file. We split this because it means
17 // we can easily edit the non-auto generated parts right here in this file 30 // we can easily edit the non-auto generated parts right here in this file
18 // instead of having to edit some template or the code generator. 31 // instead of having to edit some template or the code generator.
19 #include "gpu/command_buffer/client/client_context_state_impl_autogen.h" 32 #include "gpu/command_buffer/client/client_context_state_impl_autogen.h"
20 33
21 } // namespace gles2 34 } // namespace gles2
22 } // namespace gpu 35 } // namespace gpu
OLDNEW
« 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