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

Side by Side Diff: cc/output/output_surface.h

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 unified diff | Download patch
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_ 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_
6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 virtual void EnsureBackbuffer(); 123 virtual void EnsureBackbuffer();
124 virtual void DiscardBackbuffer(); 124 virtual void DiscardBackbuffer();
125 125
126 virtual void Reshape(const gfx::Size& size, 126 virtual void Reshape(const gfx::Size& size,
127 float scale_factor, 127 float scale_factor,
128 const gfx::ColorSpace& color_space, 128 const gfx::ColorSpace& color_space,
129 bool alpha); 129 bool alpha);
130 gfx::Size SurfaceSize() const { return surface_size_; } 130 gfx::Size SurfaceSize() const { return surface_size_; }
131 float device_scale_factor() const { return device_scale_factor_; } 131 float device_scale_factor() const { return device_scale_factor_; }
132 const gfx::ColorSpace& color_space() const { return color_space_; } 132 const gfx::ColorSpace& device_color_space() const {
133 return device_color_space_;
134 }
133 135
134 // If supported, this causes a ReclaimResources for all resources that are 136 // If supported, this causes a ReclaimResources for all resources that are
135 // currently in use. 137 // currently in use.
136 virtual void ForceReclaimResources() {} 138 virtual void ForceReclaimResources() {}
137 139
138 virtual void BindFramebuffer(); 140 virtual void BindFramebuffer();
139 // Gives the GL internal format that should be used for calling CopyTexImage2D 141 // Gives the GL internal format that should be used for calling CopyTexImage2D
140 // when the framebuffer is bound via BindFramebuffer(). 142 // when the framebuffer is bound via BindFramebuffer().
141 virtual uint32_t GetFramebufferCopyTextureFormat() = 0; 143 virtual uint32_t GetFramebufferCopyTextureFormat() = 0;
142 144
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 191
190 OutputSurfaceClient* client_ = nullptr; 192 OutputSurfaceClient* client_ = nullptr;
191 193
192 struct OutputSurface::Capabilities capabilities_; 194 struct OutputSurface::Capabilities capabilities_;
193 scoped_refptr<ContextProvider> context_provider_; 195 scoped_refptr<ContextProvider> context_provider_;
194 scoped_refptr<ContextProvider> worker_context_provider_; 196 scoped_refptr<ContextProvider> worker_context_provider_;
195 scoped_refptr<VulkanContextProvider> vulkan_context_provider_; 197 scoped_refptr<VulkanContextProvider> vulkan_context_provider_;
196 std::unique_ptr<SoftwareOutputDevice> software_device_; 198 std::unique_ptr<SoftwareOutputDevice> software_device_;
197 gfx::Size surface_size_; 199 gfx::Size surface_size_;
198 float device_scale_factor_ = -1; 200 float device_scale_factor_ = -1;
201 gfx::ColorSpace device_color_space_;
199 bool has_alpha_ = true; 202 bool has_alpha_ = true;
200 gfx::ColorSpace color_space_; 203 gfx::ColorSpace color_space_;
201 base::ThreadChecker client_thread_checker_; 204 base::ThreadChecker client_thread_checker_;
202 205
203 void SetNeedsRedrawRect(const gfx::Rect& damage_rect); 206 void SetNeedsRedrawRect(const gfx::Rect& damage_rect);
204 void ReclaimResources(const ReturnedResourceArray& resources); 207 void ReclaimResources(const ReturnedResourceArray& resources);
205 void SetExternalStencilTest(bool enabled); 208 void SetExternalStencilTest(bool enabled);
206 void DetachFromClientInternal(); 209 void DetachFromClientInternal();
207 210
208 private: 211 private:
209 bool external_stencil_test_enabled_ = false; 212 bool external_stencil_test_enabled_ = false;
210 213
211 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; 214 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
212 215
213 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 216 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
214 }; 217 };
215 218
216 } // namespace cc 219 } // namespace cc
217 220
218 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 221 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698