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

Unified Diff: cc/resources/resource_provider.h

Issue 1425533006: cc: Add flag to specify to ResourceProvider to always use GMBs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 5 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
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index c3361195f3343782ac81a84cbe4db45747c17f59..33d9a60157db18a518286c568c662dad5f524c5b 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -87,6 +87,7 @@ class CC_EXPORT ResourceProvider
BlockingTaskRunner* blocking_main_thread_task_runner,
int highp_threshold_min,
size_t id_allocation_chunk_size,
+ bool use_gpu_memory_buffer_resources,
const std::vector<unsigned>& use_image_texture_targets);
~ResourceProvider() override;
@@ -309,10 +310,7 @@ class CC_EXPORT ResourceProvider
private:
ResourceProvider* resource_provider_;
ResourceProvider::Resource* resource_;
- gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
- gfx::GpuMemoryBuffer* gpu_memory_buffer_;
- gfx::Size size_;
- ResourceFormat format_;
+ scoped_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer_;
base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGpuMemoryBuffer);
@@ -435,6 +433,7 @@ class CC_EXPORT ResourceProvider
BlockingTaskRunner* blocking_main_thread_task_runner,
int highp_threshold_min,
size_t id_allocation_chunk_size,
+ bool use_gpu_memory_buffer_resources,
const std::vector<unsigned>& use_image_texture_targets);
void Initialize();
@@ -546,6 +545,7 @@ class CC_EXPORT ResourceProvider
void DestroyChildInternal(ChildMap::iterator it, DeleteStyle style);
void LazyCreate(Resource* resource);
void LazyAllocate(Resource* resource);
+ void LazyAllocateImage(Resource* resource);
reveman 2015/11/02 23:10:25 nit: I think I prefer LazyCreateImage as this does
ccameron 2015/11/03 04:20:07 Done.
void BindImageForSampling(Resource* resource);
// Binds the given GL resource to a texture target for sampling using the
@@ -569,6 +569,7 @@ class CC_EXPORT ResourceProvider
ChildMap children_;
ResourceType default_resource_type_;
+ bool use_gpu_memory_buffer_resources_;
bool use_texture_storage_ext_;
bool use_texture_format_bgra_;
bool use_texture_usage_hint_;

Powered by Google App Engine
This is Rietveld 408576698