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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 2735853002: Offset scissor and viewport when using SetDrawRectangle on surface. (Closed)
Patch Set: remove flag Created 3 years, 9 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 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/service/gles2_cmd_decoder_unittest_base.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 new ShaderTranslatorCache(gpu_preferences_), 200 new ShaderTranslatorCache(gpu_preferences_),
201 new FramebufferCompletenessCache, feature_info, 201 new FramebufferCompletenessCache, feature_info,
202 normalized_init.bind_generates_resource, nullptr, 202 normalized_init.bind_generates_resource, nullptr,
203 nullptr, GpuFeatureInfo())); 203 nullptr, GpuFeatureInfo()));
204 bool use_default_textures = normalized_init.bind_generates_resource; 204 bool use_default_textures = normalized_init.bind_generates_resource;
205 205
206 InSequence sequence; 206 InSequence sequence;
207 207
208 surface_ = new gl::GLSurfaceStub; 208 surface_ = new gl::GLSurfaceStub;
209 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); 209 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight));
210 surface_->set_supports_draw_rectangle(surface_supports_draw_rectangle_);
210 211
211 // Context needs to be created before initializing ContextGroup, which will 212 // Context needs to be created before initializing ContextGroup, which will
212 // in turn initialize FeatureInfo, which needs a context to determine 213 // in turn initialize FeatureInfo, which needs a context to determine
213 // extension support. 214 // extension support.
214 context_ = new StrictMock<GLContextMock>(); 215 context_ = new StrictMock<GLContextMock>();
215 context_->SetExtensionsString(normalized_init.extensions.c_str()); 216 context_->SetExtensionsString(normalized_init.extensions.c_str());
216 context_->SetGLVersionString(normalized_init.gl_version.c_str()); 217 context_->SetGLVersionString(normalized_init.gl_version.c_str());
217 218
218 context_->GLContextStub::MakeCurrent(surface_.get()); 219 context_->GLContextStub::MakeCurrent(surface_.get());
219 220
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 SetupDefaultProgram(); 2185 SetupDefaultProgram();
2185 } 2186 }
2186 2187
2187 // Include the auto-generated part of this file. We split this because it means 2188 // Include the auto-generated part of this file. We split this because it means
2188 // we can easily edit the non-auto generated parts right here in this file 2189 // we can easily edit the non-auto generated parts right here in this file
2189 // instead of having to edit some template or the code generator. 2190 // instead of having to edit some template or the code generator.
2190 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 2191 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
2191 2192
2192 } // namespace gles2 2193 } // namespace gles2
2193 } // namespace gpu 2194 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698