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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « cc/test/test_in_process_context_provider.h ('k') | cc/test/test_now_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 skia::AdoptRef(skia_bindings::CreateCommandBufferSkiaGLBinding()); 117 skia::AdoptRef(skia_bindings::CreateCommandBufferSkiaGLBinding());
118 interface->fCallback = BindGrContextCallback; 118 interface->fCallback = BindGrContextCallback;
119 interface->fCallbackData = reinterpret_cast<GrGLInterfaceCallbackData>(this); 119 interface->fCallbackData = reinterpret_cast<GrGLInterfaceCallbackData>(this);
120 120
121 gr_context_ = skia::AdoptRef(GrContext::Create( 121 gr_context_ = skia::AdoptRef(GrContext::Create(
122 kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(interface.get()))); 122 kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(interface.get())));
123 123
124 return gr_context_.get(); 124 return gr_context_.get();
125 } 125 }
126 126
127 void TestInProcessContextProvider::SetupLock() {
128 }
129
130 base::Lock* TestInProcessContextProvider::GetLock() {
131 return &context_lock_;
132 }
133
127 ContextProvider::Capabilities 134 ContextProvider::Capabilities
128 TestInProcessContextProvider::ContextCapabilities() { 135 TestInProcessContextProvider::ContextCapabilities() {
129 ContextProvider::Capabilities capabilities; 136 ContextProvider::Capabilities capabilities;
130 capabilities.gpu.image = true; 137 capabilities.gpu.image = true;
131 capabilities.gpu.texture_rectangle = true; 138 capabilities.gpu.texture_rectangle = true;
132 139
133 return capabilities; 140 return capabilities;
134 } 141 }
135 142
136 bool TestInProcessContextProvider::IsContextLost() { return false; } 143 bool TestInProcessContextProvider::IsContextLost() { return false; }
137 144
138 void TestInProcessContextProvider::VerifyContexts() {} 145 void TestInProcessContextProvider::VerifyContexts() {}
139 146
140 void TestInProcessContextProvider::DeleteCachedResources() { 147 void TestInProcessContextProvider::DeleteCachedResources() {
141 if (gr_context_) 148 if (gr_context_)
142 gr_context_->freeGpuResources(); 149 gr_context_->freeGpuResources();
143 } 150 }
144 151
145 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } 152 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; }
146 153
147 void TestInProcessContextProvider::SetLostContextCallback( 154 void TestInProcessContextProvider::SetLostContextCallback(
148 const LostContextCallback& lost_context_callback) {} 155 const LostContextCallback& lost_context_callback) {}
149 156
150 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( 157 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback(
151 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} 158 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {}
152 159
153 } // namespace cc 160 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_in_process_context_provider.h ('k') | cc/test/test_now_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698