OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdio.h> | 5 #include <stdio.h> |
6 #include <cmath> | 6 #include <cmath> |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include <GLES2/gl2.h> | 10 #include <GLES2/gl2.h> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 WebGraphicsContext3D::Attributes attributes; | 59 WebGraphicsContext3D::Attributes attributes; |
60 bool lose_context_when_out_of_memory = false; | 60 bool lose_context_when_out_of_memory = false; |
61 context_ = | 61 context_ = |
62 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( | 62 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( |
63 attributes, lose_context_when_out_of_memory); | 63 attributes, lose_context_when_out_of_memory); |
64 context_->InitializeOnCurrentThread(); | 64 context_->InitializeOnCurrentThread(); |
65 context_support_ = context_->GetContextSupport(); | 65 context_support_ = context_->GetContextSupport(); |
66 helper_.reset( | 66 helper_.reset( |
67 new content::GLHelper(context_->GetGLInterface(), context_support_)); | 67 new content::GLHelper(context_->GetGLInterface(), context_support_)); |
68 helper_scaling_.reset(new content::GLHelperScaling( | 68 helper_scaling_.reset(new content::GLHelperScaling( |
69 context_->GetGLInterface(), helper_.get())); | 69 context_->GetGLInterface(), context_support_, helper_.get())); |
70 } | 70 } |
71 | 71 |
72 void TearDown() override { | 72 void TearDown() override { |
73 helper_scaling_.reset(NULL); | 73 helper_scaling_.reset(NULL); |
74 helper_.reset(NULL); | 74 helper_.reset(NULL); |
75 context_.reset(NULL); | 75 context_.reset(NULL); |
76 } | 76 } |
77 | 77 |
78 void StartTracing(const std::string& filter) { | 78 void StartTracing(const std::string& filter) { |
79 base::trace_event::TraceLog::GetInstance()->SetEnabled( | 79 base::trace_event::TraceLog::GetInstance()->SetEnabled( |
(...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1985 base::TestSuite* suite = new content::ContentTestSuite(argc, argv); | 1985 base::TestSuite* suite = new content::ContentTestSuite(argc, argv); |
1986 #if defined(OS_MACOSX) | 1986 #if defined(OS_MACOSX) |
1987 base::mac::ScopedNSAutoreleasePool pool; | 1987 base::mac::ScopedNSAutoreleasePool pool; |
1988 #endif | 1988 #endif |
1989 | 1989 |
1990 return base::LaunchUnitTestsSerially( | 1990 return base::LaunchUnitTestsSerially( |
1991 argc, | 1991 argc, |
1992 argv, | 1992 argv, |
1993 base::Bind(&RunHelper, base::Unretained(suite))); | 1993 base::Bind(&RunHelper, base::Unretained(suite))); |
1994 } | 1994 } |
OLD | NEW |