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

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

Issue 2061993003: Pass responsibility for IOSurface-texture reuse to the gpu process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp85_query_in_use
Patch Set: Compile errors. 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 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 "gpu/command_buffer/common/texture_in_use_response.h"
20 21
21 namespace base { class SingleThreadTaskRunner; } 22 namespace base { class SingleThreadTaskRunner; }
22 23
23 namespace ui { 24 namespace ui {
24 class LatencyInfo; 25 class LatencyInfo;
25 } 26 }
26 27
27 namespace gfx { 28 namespace gfx {
28 class Rect; 29 class Rect;
29 class Size; 30 class Size;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 virtual void BindFramebuffer(); 131 virtual void BindFramebuffer();
131 132
132 // The implementation may destroy or steal the contents of the CompositorFrame 133 // The implementation may destroy or steal the contents of the CompositorFrame
133 // passed in (though it will not take ownership of the CompositorFrame 134 // passed in (though it will not take ownership of the CompositorFrame
134 // itself). For successful swaps, the implementation must call 135 // itself). For successful swaps, the implementation must call
135 // OutputSurfaceClient::DidSwapBuffers() and eventually 136 // OutputSurfaceClient::DidSwapBuffers() and eventually
136 // DidSwapBuffersComplete(). 137 // DidSwapBuffersComplete().
137 virtual void SwapBuffers(CompositorFrame* frame) = 0; 138 virtual void SwapBuffers(CompositorFrame* frame) = 0;
138 virtual void OnSwapBuffersComplete(); 139 virtual void OnSwapBuffersComplete();
139 140
141 // Called by subclasses after receiving a response from the gpu process to a
142 // query about whether a given set of textures is still in use by the OS
143 // compositor.
144 void DidReceiveTextureInUseResponses(
145 const gpu::TextureInUseResponses& responses);
146
140 bool HasClient() { return !!client_; } 147 bool HasClient() { return !!client_; }
141 148
142 // Get the class capable of informing cc of hardware overlay capability. 149 // Get the class capable of informing cc of hardware overlay capability.
143 virtual OverlayCandidateValidator* GetOverlayCandidateValidator() const; 150 virtual OverlayCandidateValidator* GetOverlayCandidateValidator() const;
144 151
145 // Returns true if a main image overlay plane should be scheduled. 152 // Returns true if a main image overlay plane should be scheduled.
146 virtual bool IsDisplayedAsOverlayPlane() const; 153 virtual bool IsDisplayedAsOverlayPlane() const;
147 154
148 // Get the texture for the main image's overlay. 155 // Get the texture for the main image's overlay.
149 virtual unsigned GetOverlayTextureId() const; 156 virtual unsigned GetOverlayTextureId() const;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 bool external_stencil_test_enabled_ = false; 199 bool external_stencil_test_enabled_ = false;
193 200
194 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; 201 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
195 202
196 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 203 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
197 }; 204 };
198 205
199 } // namespace cc 206 } // namespace cc
200 207
201 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 208 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698