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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h

Issue 226423002: Merge 261120 "gpu: Lose context when BeginQueryEXT fails to allo..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1916/src/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
===================================================================
--- gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h (revision 261814)
+++ gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h (working copy)
@@ -12,6 +12,7 @@
#include "gpu/command_buffer/service/context_group.h"
#include "gpu/command_buffer/service/framebuffer_manager.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
+#include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h"
#include "gpu/command_buffer/service/program_manager.h"
#include "gpu/command_buffer/service/query_manager.h"
#include "gpu/command_buffer/service/renderbuffer_manager.h"
@@ -150,29 +151,25 @@
memory_tracker_ = memory_tracker;
}
- void InitDecoder(
- const char* extensions,
- const char* gl_version,
- bool has_alpha,
- bool has_depth,
- bool has_stencil,
- bool request_alpha,
- bool request_depth,
- bool request_stencil,
- bool bind_generates_resource);
+ struct InitState {
+ InitState();
- void InitDecoderWithCommandLine(
- const char* extensions,
- const char* gl_version,
- bool has_alpha,
- bool has_depth,
- bool has_stencil,
- bool request_alpha,
- bool request_depth,
- bool request_stencil,
- bool bind_generates_resource,
- const base::CommandLine* command_line);
+ std::string extensions;
+ std::string gl_version;
+ bool has_alpha;
+ bool has_depth;
+ bool has_stencil;
+ bool request_alpha;
+ bool request_depth;
+ bool request_stencil;
+ bool bind_generates_resource;
+ bool lose_context_when_out_of_memory;
+ };
+ void InitDecoder(const InitState& init);
+ void InitDecoderWithCommandLine(const InitState& init,
+ const base::CommandLine* command_line);
+
void ResetDecoder();
const ContextGroup& group() const {
@@ -489,7 +486,7 @@
scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
scoped_refptr<gfx::GLSurfaceStub> surface_;
scoped_refptr<gfx::GLContextStubWithExtensions> context_;
- scoped_ptr<GLES2Decoder> mock_decoder_;
+ scoped_ptr<MockGLES2Decoder> mock_decoder_;
scoped_ptr<GLES2Decoder> decoder_;
MemoryTracker* memory_tracker_;

Powered by Google App Engine
This is Rietveld 408576698