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

Unified Diff: cc/output/direct_renderer.h

Issue 2743663006: Allow switching DirectCompositionSurfaceWin between drawing modes. (Closed)
Patch Set: fix release current in resize 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') | cc/output/gl_renderer_unittest.cc » ('J')
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 e1e7028f1377c9a7a3af2a0dc139830fc9c2b842..e5b9b51546072dac70c6fa45ded8a5cba56ca23a 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;
+ // This counts the number of draws since the last time
+ // DirectComposition layers needed to be used.
+ int frames_since_using_dc_layers_ = 0;
+
+ bool using_dc_layers_ = false;
// 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') | cc/output/gl_renderer_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698