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

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

Issue 2088273003: Video Color Managament (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bugfix 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 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
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "cc/base/cc_export.h" 15 #include "cc/base/cc_export.h"
16 #include "cc/output/context_provider.h" 16 #include "cc/output/context_provider.h"
17 #include "cc/output/overlay_candidate_validator.h" 17 #include "cc/output/overlay_candidate_validator.h"
18 #include "cc/output/software_output_device.h" 18 #include "cc/output/software_output_device.h"
19 #include "cc/output/vulkan_context_provider.h" 19 #include "cc/output/vulkan_context_provider.h"
20 #include "cc/resources/returned_resource.h" 20 #include "cc/resources/returned_resource.h"
21 #include "gpu/command_buffer/common/texture_in_use_response.h" 21 #include "gpu/command_buffer/common/texture_in_use_response.h"
22 #include "ui/gfx/color_space.h"
22 23
23 namespace base { class SingleThreadTaskRunner; } 24 namespace base { class SingleThreadTaskRunner; }
24 25
25 namespace ui { 26 namespace ui {
26 class LatencyInfo; 27 class LatencyInfo;
27 } 28 }
28 29
29 namespace gfx { 30 namespace gfx {
30 class ColorSpace; 31 class ColorSpace;
31 class Rect; 32 class Rect;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 124
124 virtual void EnsureBackbuffer(); 125 virtual void EnsureBackbuffer();
125 virtual void DiscardBackbuffer(); 126 virtual void DiscardBackbuffer();
126 127
127 virtual void Reshape(const gfx::Size& size, 128 virtual void Reshape(const gfx::Size& size,
128 float scale_factor, 129 float scale_factor,
129 const gfx::ColorSpace& color_space, 130 const gfx::ColorSpace& color_space,
130 bool alpha); 131 bool alpha);
131 gfx::Size SurfaceSize() const { return surface_size_; } 132 gfx::Size SurfaceSize() const { return surface_size_; }
132 float device_scale_factor() const { return device_scale_factor_; } 133 float device_scale_factor() const { return device_scale_factor_; }
134 const gfx::ColorSpace& color_space() const { return color_space_; }
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
199 bool has_alpha_ = true; 201 bool has_alpha_ = true;
202 gfx::ColorSpace color_space_;
200 base::ThreadChecker client_thread_checker_; 203 base::ThreadChecker client_thread_checker_;
201 204
202 void SetNeedsRedrawRect(const gfx::Rect& damage_rect); 205 void SetNeedsRedrawRect(const gfx::Rect& damage_rect);
203 void ReclaimResources(const ReturnedResourceArray& resources); 206 void ReclaimResources(const ReturnedResourceArray& resources);
204 void SetExternalStencilTest(bool enabled); 207 void SetExternalStencilTest(bool enabled);
205 void DetachFromClientInternal(); 208 void DetachFromClientInternal();
206 209
207 private: 210 private:
208 bool external_stencil_test_enabled_ = false; 211 bool external_stencil_test_enabled_ = false;
209 212
210 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; 213 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
211 214
212 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 215 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
213 }; 216 };
214 217
215 } // namespace cc 218 } // namespace cc
216 219
217 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 220 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698