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

Unified Diff: components/display_compositor/buffer_queue.cc

Issue 2119723002: Color: Add SetColorSpace member to gfx::GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plumb_2
Patch Set: Add OWNERs Created 4 years, 6 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: components/display_compositor/buffer_queue.cc
diff --git a/components/display_compositor/buffer_queue.cc b/components/display_compositor/buffer_queue.cc
index be5840706a2e9328b16b0125c80e9f01f1b12f79..bcdb62c3d21157019b5df48f4ea8c1ded7670a95 100644
--- a/components/display_compositor/buffer_queue.cc
+++ b/components/display_compositor/buffer_queue.cc
@@ -107,8 +107,10 @@ void BufferQueue::SwapBuffers(const gfx::Rect& damage) {
gl_->BindFramebuffer(GL_FRAMEBUFFER, fbo_);
}
-void BufferQueue::Reshape(const gfx::Size& size, float scale_factor) {
- if (size == size_)
+void BufferQueue::Reshape(const gfx::Size& size,
+ float scale_factor,
+ const gfx::ColorSpace& color_space) {
+ if (size == size_ && color_space == color_space_)
hubbe 2016/07/06 21:30:53 Isn't this the kind of comparison you were worried
return;
#if !defined(OS_MACOSX)
// TODO(ccameron): This assert is being hit on Mac try jobs. Determine if that
@@ -117,6 +119,7 @@ void BufferQueue::Reshape(const gfx::Size& size, float scale_factor) {
DCHECK(!current_surface_);
#endif
size_ = size;
+ color_space_ = color_space;
// TODO: add stencil buffer when needed.
gl_->BindFramebuffer(GL_FRAMEBUFFER, fbo_);
@@ -218,6 +221,7 @@ std::unique_ptr<BufferQueue::AllocatedSurface> BufferQueue::GetNextSurface() {
DLOG(ERROR) << "Failed to allocate GPU memory buffer";
return nullptr;
}
+ buffer->SetColorSpaceForScanout(color_space_);
uint32_t id =
gl_->CreateImageCHROMIUM(buffer->AsClientBuffer(), size_.width(),

Powered by Google App Engine
This is Rietveld 408576698