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

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

Issue 12017032: Add calls to EnsureGPUMemoryAvailable into GLES2DecoderImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 22 matching lines...) Expand all
33 using ::testing::SetArgumentPointee; 33 using ::testing::SetArgumentPointee;
34 using ::testing::StrEq; 34 using ::testing::StrEq;
35 using ::testing::StrictMock; 35 using ::testing::StrictMock;
36 36
37 namespace gpu { 37 namespace gpu {
38 namespace gles2 { 38 namespace gles2 {
39 39
40 GLES2DecoderTestBase::GLES2DecoderTestBase() 40 GLES2DecoderTestBase::GLES2DecoderTestBase()
41 : surface_(NULL), 41 : surface_(NULL),
42 context_(NULL), 42 context_(NULL),
43 memory_tracker_(NULL),
43 client_buffer_id_(100), 44 client_buffer_id_(100),
44 client_framebuffer_id_(101), 45 client_framebuffer_id_(101),
45 client_program_id_(102), 46 client_program_id_(102),
46 client_renderbuffer_id_(103), 47 client_renderbuffer_id_(103),
47 client_shader_id_(104), 48 client_shader_id_(104),
48 client_texture_id_(106), 49 client_texture_id_(106),
49 client_element_buffer_id_(107), 50 client_element_buffer_id_(107),
50 client_vertex_shader_id_(121), 51 client_vertex_shader_id_(121),
51 client_fragment_shader_id_(122), 52 client_fragment_shader_id_(122),
52 client_query_id_(123), 53 client_query_id_(123),
(...skipping 30 matching lines...) Expand all
83 bool has_stencil, 84 bool has_stencil,
84 bool request_alpha, 85 bool request_alpha,
85 bool request_depth, 86 bool request_depth,
86 bool request_stencil, 87 bool request_stencil,
87 bool bind_generates_resource) { 88 bool bind_generates_resource) {
88 FramebufferManager::FramebufferInfo::ClearFramebufferCompleteComboMap(); 89 FramebufferManager::FramebufferInfo::ClearFramebufferCompleteComboMap();
89 gl_.reset(new StrictMock<MockGLInterface>()); 90 gl_.reset(new StrictMock<MockGLInterface>());
90 ::gfx::GLInterface::SetGLInterface(gl_.get()); 91 ::gfx::GLInterface::SetGLInterface(gl_.get());
91 group_ = ContextGroup::Ref(new ContextGroup(NULL, 92 group_ = ContextGroup::Ref(new ContextGroup(NULL,
92 NULL, 93 NULL,
93 NULL, 94 memory_tracker_,
94 bind_generates_resource)); 95 bind_generates_resource));
95 96
96 InSequence sequence; 97 InSequence sequence;
97 98
98 TestHelper::SetupContextGroupInitExpectations(gl_.get(), 99 TestHelper::SetupContextGroupInitExpectations(gl_.get(),
99 DisallowedFeatures(), extensions); 100 DisallowedFeatures(), extensions);
100 101
101 // We initialize the ContextGroup with a MockGLES2Decoder so that 102 // We initialize the ContextGroup with a MockGLES2Decoder so that
102 // we can use the ContextGroup to figure out how the real GLES2Decoder 103 // we can use the ContextGroup to figure out how the real GLES2Decoder
103 // will initialize itself. 104 // will initialize itself.
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 SetupDefaultProgram(); 1376 SetupDefaultProgram();
1376 } 1377 }
1377 1378
1378 // Include the auto-generated part of this file. We split this because it means 1379 // Include the auto-generated part of this file. We split this because it means
1379 // we can easily edit the non-auto generated parts right here in this file 1380 // we can easily edit the non-auto generated parts right here in this file
1380 // instead of having to edit some template or the code generator. 1381 // instead of having to edit some template or the code generator.
1381 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 1382 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
1382 1383
1383 } // namespace gles2 1384 } // namespace gles2
1384 } // namespace gpu 1385 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h ('k') | gpu/command_buffer/service/memory_tracking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698