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

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

Issue 1095893002: gpu: Fix some context lost marking glitches+leaks and add UMA stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kbr's comment Created 5 years, 8 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
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
index 0ca537a8952aaa9e3a6ddf9c23bb5b818e285952..7719cdf3960f702162a650129b4651738589d237 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
@@ -11,6 +11,7 @@
#include "gpu/command_buffer/service/cmd_buffer_engine.h"
#include "gpu/command_buffer/service/context_group.h"
#include "gpu/command_buffer/service/framebuffer_manager.h"
+#include "gpu/command_buffer/service/gl_context_mock.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"
@@ -22,7 +23,6 @@
#include "gpu/command_buffer/service/valuebuffer_manager.h"
#include "gpu/command_buffer/service/vertex_array_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/gl/gl_context_stub_with_extensions.h"
#include "ui/gl/gl_surface_stub.h"
#include "ui/gl/gl_mock.h"
@@ -211,6 +211,10 @@ class GLES2DecoderTestBase : public ::testing::TestWithParam<bool> {
return *group_.get();
}
+ void LoseContexts(error::ContextLostReason reason) const {
+ group_->LoseContexts(reason);
+ }
+
::testing::StrictMock< ::gfx::MockGLInterface>* GetGLMock() const {
return gl_.get();
}
@@ -540,7 +544,7 @@ class GLES2DecoderTestBase : public ::testing::TestWithParam<bool> {
// Use StrictMock to make 100% sure we know how GL will be called.
scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
scoped_refptr<gfx::GLSurfaceStub> surface_;
- scoped_refptr<gfx::GLContextStubWithExtensions> context_;
+ scoped_refptr<GLContextMock> context_;
scoped_ptr<MockGLES2Decoder> mock_decoder_;
scoped_ptr<GLES2Decoder> decoder_;
MemoryTracker* memory_tracker_;

Powered by Google App Engine
This is Rietveld 408576698