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

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: Fix test and build 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
« no previous file with comments | « cc/output/renderer_settings.cc ('k') | 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 c3361195f3343782ac81a84cbe4db45747c17f59..0c93a07e2f8b8aaa4c6c7d53734b3ade85d98c18 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 LazyCreateImage(Resource* resource);
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_;
« no previous file with comments | « cc/output/renderer_settings.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698