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

Unified Diff: cc/output/direct_renderer.h

Issue 2253823002: cc: Remove all impl-side caps from RendererCapabilitiesImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delete-renderer-base-class
Patch Set: renderercaps: ennereview 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/delegating_renderer.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/direct_renderer.h
diff --git a/cc/output/direct_renderer.h b/cc/output/direct_renderer.h
index 9e7be470c6dd6431e2ae63840a13f9d9377040bd..7c506e0f69617ca33c8f915980db68be2f05237f 100644
--- a/cc/output/direct_renderer.h
+++ b/cc/output/direct_renderer.h
@@ -45,6 +45,10 @@ class CC_EXPORT DirectRenderer {
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 +144,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 +180,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>,
@@ -196,6 +207,7 @@ class CC_EXPORT DirectRenderer {
gfx::Rect current_window_space_viewport_;
private:
+ bool initialized_ = false;
gfx::Size enlarge_pass_texture_amount_;
DISALLOW_COPY_AND_ASSIGN(DirectRenderer);
« no previous file with comments | « cc/output/delegating_renderer.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698