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

Unified Diff: cc/resources/resource_provider.h

Issue 49163004: cc: Reduce command buffer flushes related to creating texture ids. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add LayerTreeSettings::texture_id_allocation_chunk_size Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index 23f1414fa0d6d921c23ca2b4555e00f0296f12fb..d1ed64a661d947b2494a1507fa60d6e51a2038f3 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -65,7 +65,8 @@ class CC_EXPORT ResourceProvider {
OutputSurface* output_surface,
SharedBitmapManager* shared_bitmap_manager,
int highp_threshold_min,
- bool use_rgba_4444_texture_format);
+ bool use_rgba_4444_texture_format,
+ size_t texture_id_allocation_chunk_size);
virtual ~ResourceProvider();
void InitializeSoftware();
@@ -432,7 +433,8 @@ class CC_EXPORT ResourceProvider {
ResourceProvider(OutputSurface* output_surface,
SharedBitmapManager* shared_bitmap_manager,
int highp_threshold_min,
- bool use_rgba_4444_texture_format);
+ bool use_rgba_4444_texture_format,
+ size_t texture_id_allocation_chunk_size);
void CleanUpGLIfNeeded();
@@ -469,6 +471,8 @@ 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_;
@@ -492,6 +496,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_;
+
DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
};

Powered by Google App Engine
This is Rietveld 408576698