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

Unified Diff: cc/resources/resource_provider.h

Issue 58603002: cc: Reduce command buffer flushes related to creating buffer ids. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index d1ed64a661d947b2494a1507fa60d6e51a2038f3..463391c58472cd2a8548de1f5de9fe74cf8956a6 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -39,6 +39,7 @@ class Vector2d;
}
namespace cc {
+class IdAllocator;
class SharedBitmap;
class SharedBitmapManager;
class TextureUploader;
@@ -66,7 +67,7 @@ class CC_EXPORT ResourceProvider {
SharedBitmapManager* shared_bitmap_manager,
int highp_threshold_min,
bool use_rgba_4444_texture_format,
- size_t texture_id_allocation_chunk_size);
+ size_t id_allocation_chunk_size);
virtual ~ResourceProvider();
void InitializeSoftware();
@@ -434,7 +435,7 @@ class CC_EXPORT ResourceProvider {
SharedBitmapManager* shared_bitmap_manager,
int highp_threshold_min,
bool use_rgba_4444_texture_format,
- size_t texture_id_allocation_chunk_size);
+ size_t id_allocation_chunk_size);
void CleanUpGLIfNeeded();
@@ -471,8 +472,6 @@ class CC_EXPORT ResourceProvider {
// Returns NULL if the output_surface_ does not have a ContextProvider.
WebKit::WebGraphicsContext3D* Context3d() const;
- unsigned NextTextureId();
-
OutputSurface* output_surface_;
SharedBitmapManager* shared_bitmap_manager_;
bool lost_output_surface_;
@@ -496,8 +495,9 @@ class CC_EXPORT ResourceProvider {
scoped_refptr<Fence> current_read_lock_fence_;
bool use_rgba_4444_texture_format_;
- size_t texture_id_allocation_chunk_size_;
- std::deque<unsigned> unused_texture_ids_;
+ const size_t id_allocation_chunk_size_;
+ scoped_ptr<IdAllocator> texture_id_allocator_;
+ scoped_ptr<IdAllocator> buffer_id_allocator_;
DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
};
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698