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

Unified Diff: cc/output/direct_renderer.h

Issue 2743663006: Allow switching DirectCompositionSurfaceWin between drawing modes. (Closed)
Patch Set: rebase Created 3 years, 9 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 | « no previous file | 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 eb8ddab38fbf8c430b3e54f240254469668ab039..70632063e492dfd89b08744f28a485e897b2a274 100644
--- a/cc/output/direct_renderer.h
+++ b/cc/output/direct_renderer.h
@@ -166,6 +166,7 @@ class CC_EXPORT DirectRenderer {
virtual void DidChangeVisibility() = 0;
virtual void CopyCurrentRenderPassToBitmap(
std::unique_ptr<CopyOutputRequest> request) = 0;
+ virtual void SetEnableDCLayers(bool enable) = 0;
gfx::Size surface_size_for_swap_buffers() const {
return reshape_surface_size_;
@@ -184,8 +185,14 @@ class CC_EXPORT DirectRenderer {
bool use_partial_swap_ = false;
// Whether overdraw feedback is enabled and can be used.
bool overdraw_feedback_ = false;
- // Whether the SetDrawRectangle command is in use.
- bool use_set_draw_rectangle_ = false;
+ // Whether the SetDrawRectangle and EnableDCLayers commands are in
+ // use.
+ bool supports_dc_layers_ = false;
+ // Whether the output surface is actually using DirectComposition.
+ bool using_dc_layers_ = false;
+ // This counts the number of draws since the last time
+ // DirectComposition layers needed to be used.
+ int frames_since_using_dc_layers_ = 0;
// TODO(danakj): Just use a vector of pairs here? Hash map is way overkill.
std::unordered_map<int, std::unique_ptr<ScopedResource>>
« no previous file with comments | « no previous file | cc/output/direct_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698