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

Side by Side Diff: cc/test/test_in_process_context_provider.cc

Issue 226203004: Fix skia ganesh resources leak. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/test/test_in_process_context_provider.h" 5 #include "cc/test/test_in_process_context_provider.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "gpu/GLES2/gl2extchromium.h" 8 #include "gpu/GLES2/gl2extchromium.h"
9 #include "gpu/command_buffer/client/gl_in_process_context.h" 9 #include "gpu/command_buffer/client/gl_in_process_context.h"
10 #include "gpu/command_buffer/client/gles2_implementation.h" 10 #include "gpu/command_buffer/client/gles2_implementation.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 attribs, 42 attribs,
43 gpu_preference)); 43 gpu_preference));
44 DCHECK(context); 44 DCHECK(context);
45 return context.Pass(); 45 return context.Pass();
46 } 46 }
47 47
48 TestInProcessContextProvider::TestInProcessContextProvider() 48 TestInProcessContextProvider::TestInProcessContextProvider()
49 : context_(CreateTestInProcessContext()) {} 49 : context_(CreateTestInProcessContext()) {}
50 50
51 TestInProcessContextProvider::~TestInProcessContextProvider() { 51 TestInProcessContextProvider::~TestInProcessContextProvider() {
52 if (gr_context_)
53 gr_context_->contextDestroyed();
54 } 52 }
55 53
56 bool TestInProcessContextProvider::BindToCurrentThread() { return true; } 54 bool TestInProcessContextProvider::BindToCurrentThread() { return true; }
57 55
58 gpu::gles2::GLES2Interface* TestInProcessContextProvider::ContextGL() { 56 gpu::gles2::GLES2Interface* TestInProcessContextProvider::ContextGL() {
59 return context_->GetImplementation(); 57 return context_->GetImplementation();
60 } 58 }
61 59
62 gpu::ContextSupport* TestInProcessContextProvider::ContextSupport() { 60 gpu::ContextSupport* TestInProcessContextProvider::ContextSupport() {
63 return context_->GetImplementation(); 61 return context_->GetImplementation();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 117
120 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } 118 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; }
121 119
122 void TestInProcessContextProvider::SetLostContextCallback( 120 void TestInProcessContextProvider::SetLostContextCallback(
123 const LostContextCallback& lost_context_callback) {} 121 const LostContextCallback& lost_context_callback) {}
124 122
125 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( 123 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback(
126 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} 124 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {}
127 125
128 } // namespace cc 126 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_in_process_context_provider.h ('k') | content/common/gpu/client/context_provider_command_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698