| 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 "gpu/command_buffer/service/mailbox_manager_sync.h" | 5 #include "gpu/command_buffer/service/mailbox_manager_sync.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 bool SkipTextureWorkarounds(const Texture* texture) { | 25 bool SkipTextureWorkarounds(const Texture* texture) { |
| 26 // TODO(sievers): crbug.com/352274 | 26 // TODO(sievers): crbug.com/352274 |
| 27 // Should probably only fail if it already *has* mipmaps, while allowing | 27 // Should probably only fail if it already *has* mipmaps, while allowing |
| 28 // incomplete textures here. | 28 // incomplete textures here. |
| 29 bool needs_mips = | 29 bool needs_mips = |
| 30 texture->min_filter() != GL_NEAREST && texture->min_filter() != GL_LINEAR; | 30 texture->min_filter() != GL_NEAREST && texture->min_filter() != GL_LINEAR; |
| 31 if (texture->target() != GL_TEXTURE_2D || needs_mips || !texture->IsDefined()) | 31 if (texture->target() != GL_TEXTURE_2D || needs_mips || !texture->IsDefined()) |
| 32 return true; | 32 return true; |
| 33 | 33 |
| 34 // Skip compositor resources/tile textures. | |
| 35 // TODO: Remove this, see crbug.com/399226. | |
| 36 if (texture->pool() == GL_TEXTURE_POOL_MANAGED_CHROMIUM) | |
| 37 return true; | |
| 38 | |
| 39 return false; | 34 return false; |
| 40 } | 35 } |
| 41 | 36 |
| 42 base::LazyInstance<base::Lock> g_lock = LAZY_INSTANCE_INITIALIZER; | 37 base::LazyInstance<base::Lock> g_lock = LAZY_INSTANCE_INITIALIZER; |
| 43 | 38 |
| 44 typedef std::map<uint32, linked_ptr<gfx::GLFence>> SyncPointToFenceMap; | 39 typedef std::map<uint32, linked_ptr<gfx::GLFence>> SyncPointToFenceMap; |
| 45 base::LazyInstance<SyncPointToFenceMap> g_sync_point_to_fence = | 40 base::LazyInstance<SyncPointToFenceMap> g_sync_point_to_fence = |
| 46 LAZY_INSTANCE_INITIALIZER; | 41 LAZY_INSTANCE_INITIALIZER; |
| 47 #if !defined(OS_MACOSX) | 42 #if !defined(OS_MACOSX) |
| 48 base::LazyInstance<std::queue<SyncPointToFenceMap::iterator>> g_sync_points = | 43 base::LazyInstance<std::queue<SyncPointToFenceMap::iterator>> g_sync_points = |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 if (texture_version == definition.version() || | 325 if (texture_version == definition.version() || |
| 331 definition.IsOlderThan(texture_version)) | 326 definition.IsOlderThan(texture_version)) |
| 332 continue; | 327 continue; |
| 333 texture_version = definition.version(); | 328 texture_version = definition.version(); |
| 334 definition.UpdateTexture(texture); | 329 definition.UpdateTexture(texture); |
| 335 } | 330 } |
| 336 } | 331 } |
| 337 | 332 |
| 338 } // namespace gles2 | 333 } // namespace gles2 |
| 339 } // namespace gpu | 334 } // namespace gpu |
| OLD | NEW |