OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/resources/resource_provider.h" | 5 #include "cc/resources/resource_provider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2254 resource->mailbox.set_sync_point(0); | 2254 resource->mailbox.set_sync_point(0); |
2255 } | 2255 } |
2256 | 2256 |
2257 GLint ResourceProvider::GetActiveTextureUnit(GLES2Interface* gl) { | 2257 GLint ResourceProvider::GetActiveTextureUnit(GLES2Interface* gl) { |
2258 GLint active_unit = 0; | 2258 GLint active_unit = 0; |
2259 gl->GetIntegerv(GL_ACTIVE_TEXTURE, &active_unit); | 2259 gl->GetIntegerv(GL_ACTIVE_TEXTURE, &active_unit); |
2260 return active_unit; | 2260 return active_unit; |
2261 } | 2261 } |
2262 | 2262 |
2263 GLES2Interface* ResourceProvider::ContextGL() const { | 2263 GLES2Interface* ResourceProvider::ContextGL() const { |
2264 ContextProvider* context_provider = output_surface_->context_provider().get(); | 2264 ContextProvider* context_provider = output_surface_->context_provider(); |
2265 return context_provider ? context_provider->ContextGL() : NULL; | 2265 return context_provider ? context_provider->ContextGL() : NULL; |
2266 } | 2266 } |
2267 | 2267 |
2268 class GrContext* ResourceProvider::GrContext() const { | 2268 class GrContext* ResourceProvider::GrContext() const { |
2269 ContextProvider* context_provider = output_surface_->context_provider().get(); | 2269 ContextProvider* context_provider = output_surface_->context_provider(); |
2270 return context_provider ? context_provider->GrContext() : NULL; | 2270 return context_provider ? context_provider->GrContext() : NULL; |
2271 } | 2271 } |
2272 | 2272 |
2273 } // namespace cc | 2273 } // namespace cc |
OLD | NEW |