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

Side by Side Diff: content/browser/compositor/offscreen_browser_compositor_output_surface.cc

Issue 2102203003: Color: Plumb color profile from ui::Compositor to cc::DirectRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of s/ColorProfile/ColorSpace/ Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/compositor/offscreen_browser_compositor_output_surface .h" 5 #include "content/browser/compositor/offscreen_browser_compositor_output_surface .h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 reflector_->OnSourceTextureMailboxUpdated(nullptr); 99 reflector_->OnSourceTextureMailboxUpdated(nullptr);
100 } 100 }
101 101
102 if (fbo_) { 102 if (fbo_) {
103 gl->BindFramebuffer(GL_FRAMEBUFFER, fbo_); 103 gl->BindFramebuffer(GL_FRAMEBUFFER, fbo_);
104 gl->DeleteFramebuffers(1, &fbo_); 104 gl->DeleteFramebuffers(1, &fbo_);
105 fbo_ = 0; 105 fbo_ = 0;
106 } 106 }
107 } 107 }
108 108
109 void OffscreenBrowserCompositorOutputSurface::Reshape(const gfx::Size& size, 109 void OffscreenBrowserCompositorOutputSurface::Reshape(
110 float scale_factor, 110 const gfx::Size& size,
111 bool alpha) { 111 float scale_factor,
112 const gfx::ColorSpace& color_space,
113 bool alpha) {
112 if (size == surface_size_) 114 if (size == surface_size_)
113 return; 115 return;
114 116
115 surface_size_ = size; 117 surface_size_ = size;
116 device_scale_factor_ = scale_factor; 118 device_scale_factor_ = scale_factor;
117 DiscardBackbuffer(); 119 DiscardBackbuffer();
118 EnsureBackbuffer(); 120 EnsureBackbuffer();
119 } 121 }
120 122
121 void OffscreenBrowserCompositorOutputSurface::BindFramebuffer() { 123 void OffscreenBrowserCompositorOutputSurface::BindFramebuffer() {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (reflector_) 166 if (reflector_)
165 EnsureBackbuffer(); 167 EnsureBackbuffer();
166 } 168 }
167 169
168 base::Closure 170 base::Closure
169 OffscreenBrowserCompositorOutputSurface::CreateCompositionStartedCallback() { 171 OffscreenBrowserCompositorOutputSurface::CreateCompositionStartedCallback() {
170 return base::Closure(); 172 return base::Closure();
171 } 173 }
172 174
173 } // namespace content 175 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698