Index: cc/output/direct_renderer.h |
diff --git a/cc/output/direct_renderer.h b/cc/output/direct_renderer.h |
index 9e7be470c6dd6431e2ae63840a13f9d9377040bd..2b591f822200ed2dc07d5fbc559fc21a4a10487c 100644 |
--- a/cc/output/direct_renderer.h |
+++ b/cc/output/direct_renderer.h |
@@ -40,11 +40,19 @@ class ScopedResource; |
// for reference). |
class CC_EXPORT DirectRenderer { |
public: |
+ struct Capabilities { |
enne (OOO)
2016/08/17 17:48:42
Where does this get used?
danakj
2016/08/17 18:16:41
I think I was going to do this but then I didn't s
|
+ bool using_partial_swap = false; |
+ }; |
+ |
DirectRenderer(const RendererSettings* settings, |
OutputSurface* output_surface, |
ResourceProvider* resource_provider); |
virtual ~DirectRenderer(); |
+ void Initialize(); |
+ |
+ bool use_partial_swap() const { return use_partial_swap_; } |
+ |
void SetVisible(bool visible); |
void DecideRenderPassAllocationsForFrame( |
const RenderPassList& render_passes_in_draw_order); |
@@ -140,6 +148,7 @@ class CC_EXPORT DirectRenderer { |
bool use_render_pass_scissor); |
// Private interface implemented by subclasses for use by DirectRenderer. |
+ virtual bool CanPartialSwap() = 0; |
virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; |
virtual bool BindFramebufferToTexture(DrawingFrame* frame, |
const ScopedResource* resource) = 0; |
@@ -175,6 +184,12 @@ class CC_EXPORT DirectRenderer { |
// This can be replaced by test implementations. |
std::unique_ptr<OverlayProcessor> overlay_processor_; |
+ // Whether it's valid to SwapBuffers with an empty rect. Trivially true when |
+ // using partial swap. |
+ bool allow_empty_swap_; |
+ // Whether partial swap can be used. |
+ bool use_partial_swap_; |
+ |
// TODO(danakj): Just use a vector of pairs here? Hash map is way overkill. |
std::unordered_map<RenderPassId, |
std::unique_ptr<ScopedResource>, |