| 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 #ifndef CC_RESOURCE_PROVIDER_H_ | 5 #ifndef CC_RESOURCE_PROVIDER_H_ |
| 6 #define CC_RESOURCE_PROVIDER_H_ | 6 #define CC_RESOURCE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <set> |
| 9 #include <string> | 10 #include <string> |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 13 #include "base/callback.h" | 14 #include "base/callback.h" |
| 14 #include "base/hash_tables.h" | 15 #include "base/hash_tables.h" |
| 15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/threading/thread_checker.h" | 17 #include "base/threading/thread_checker.h" |
| 17 #include "cc/cc_export.h" | 18 #include "cc/cc_export.h" |
| 18 #include "cc/output_surface.h" | 19 #include "cc/output_surface.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 37 | 38 |
| 38 class ContextProvider; | 39 class ContextProvider; |
| 39 class TextureUploader; | 40 class TextureUploader; |
| 40 | 41 |
| 41 // This class is not thread-safe and can only be called from the thread it was | 42 // This class is not thread-safe and can only be called from the thread it was |
| 42 // created on (in practice, the impl thread). | 43 // created on (in practice, the impl thread). |
| 43 class CC_EXPORT ResourceProvider { | 44 class CC_EXPORT ResourceProvider { |
| 44 public: | 45 public: |
| 45 typedef unsigned ResourceId; | 46 typedef unsigned ResourceId; |
| 46 typedef std::vector<ResourceId> ResourceIdArray; | 47 typedef std::vector<ResourceId> ResourceIdArray; |
| 48 typedef std::set<ResourceId> ResourceIdSet; |
| 47 typedef base::hash_map<ResourceId, ResourceId> ResourceIdMap; | 49 typedef base::hash_map<ResourceId, ResourceId> ResourceIdMap; |
| 48 enum TextureUsageHint { | 50 enum TextureUsageHint { |
| 49 TextureUsageAny, | 51 TextureUsageAny, |
| 50 TextureUsageFramebuffer, | 52 TextureUsageFramebuffer, |
| 51 }; | 53 }; |
| 52 enum ResourceType { | 54 enum ResourceType { |
| 53 GLTexture = 1, | 55 GLTexture = 1, |
| 54 Bitmap, | 56 Bitmap, |
| 55 }; | 57 }; |
| 56 | 58 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 base::ThreadChecker m_threadChecker; | 345 base::ThreadChecker m_threadChecker; |
| 344 | 346 |
| 345 scoped_refptr<Fence> m_currentReadLockFence; | 347 scoped_refptr<Fence> m_currentReadLockFence; |
| 346 | 348 |
| 347 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 349 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 348 }; | 350 }; |
| 349 | 351 |
| 350 } | 352 } |
| 351 | 353 |
| 352 #endif // CC_RESOURCE_PROVIDER_H_ | 354 #endif // CC_RESOURCE_PROVIDER_H_ |
| OLD | NEW |