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

Unified Diff: cc/resources/scoped_resource.cc

Issue 2235623003: cc: Add gfx::ColorSpace to cc::ResourceProvider resource creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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
« no previous file with comments | « cc/resources/scoped_resource.h ('k') | cc/resources/scoped_resource_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/scoped_resource.cc
diff --git a/cc/resources/scoped_resource.cc b/cc/resources/scoped_resource.cc
index 532ca120baa0073c84124b288218d8a92c8230ba..b29b7c43c31de7b5fe1c1409fe997f2e269d1038 100644
--- a/cc/resources/scoped_resource.cc
+++ b/cc/resources/scoped_resource.cc
@@ -17,27 +17,31 @@ ScopedResource::~ScopedResource() {
void ScopedResource::Allocate(const gfx::Size& size,
ResourceProvider::TextureHint hint,
- ResourceFormat format) {
+ ResourceFormat format,
+ const gfx::ColorSpace& color_space) {
DCHECK(!id());
DCHECK(!size.IsEmpty());
set_dimensions(size, format);
- set_id(resource_provider_->CreateResource(size, hint, format));
+ set_id(resource_provider_->CreateResource(size, hint, format, color_space));
#if DCHECK_IS_ON()
allocate_thread_id_ = base::PlatformThread::CurrentId();
#endif
}
-void ScopedResource::AllocateWithGpuMemoryBuffer(const gfx::Size& size,
- ResourceFormat format,
- gfx::BufferUsage usage) {
+void ScopedResource::AllocateWithGpuMemoryBuffer(
+ const gfx::Size& size,
+ ResourceFormat format,
+ gfx::BufferUsage usage,
+ const gfx::ColorSpace& color_space) {
DCHECK(!id());
DCHECK(!size.IsEmpty());
set_dimensions(size, format);
set_id(resource_provider_->CreateGpuMemoryBufferResource(
- size, ResourceProvider::TEXTURE_HINT_IMMUTABLE, format, usage));
+ size, ResourceProvider::TEXTURE_HINT_IMMUTABLE, format, usage,
+ color_space));
#if DCHECK_IS_ON()
allocate_thread_id_ = base::PlatformThread::CurrentId();
« no previous file with comments | « cc/resources/scoped_resource.h ('k') | cc/resources/scoped_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698