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

Unified Diff: cc/output/direct_renderer.h

Issue 2399983003: cc: Make OutputSurface::Reshape abstract (Closed)
Patch Set: reshapeabstract: . Created 4 years, 2 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 | « blimp/client/support/compositor/blimp_embedder_compositor.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 2b6674ea771e887a0d1855a3d66fecc02ae27922..af7327784683dc3373a148ca8e8a55e3291e94b8 100644
--- a/cc/output/direct_renderer.h
+++ b/cc/output/direct_renderer.h
@@ -81,6 +81,7 @@ class CC_EXPORT DirectRenderer {
gfx::Rect root_damage_rect;
gfx::Size device_viewport_size;
+ gfx::ColorSpace device_color_space;
gfx::Transform projection_matrix;
gfx::Transform window_matrix;
@@ -168,6 +169,10 @@ class CC_EXPORT DirectRenderer {
DrawingFrame* frame,
std::unique_ptr<CopyOutputRequest> request) = 0;
+ gfx::Size surface_size_for_swap_buffers() const {
+ return reshape_surface_size_;
+ }
+
const RendererSettings* const settings_;
OutputSurface* const output_surface_;
ResourceProvider* const resource_provider_;
@@ -190,9 +195,6 @@ class CC_EXPORT DirectRenderer {
bool visible_ = false;
- // The size of the surface produced by DrawFrame() for SwapBuffers() to use.
- gfx::Size surface_size_for_swap_buffers_;
-
// For use in coordinate conversion, this stores the output rect, viewport
// rect (= unflipped version of glViewport rect), the size of target
// framebuffer, and the current window space viewport. During a draw, this
@@ -207,6 +209,12 @@ class CC_EXPORT DirectRenderer {
bool initialized_ = false;
gfx::Size enlarge_pass_texture_amount_;
+ // Cached values given to Reshape().
+ gfx::Size reshape_surface_size_;
+ float reshape_device_scale_factor_ = 0.f;
+ gfx::ColorSpace reshape_device_color_space_;
+ bool reshape_has_alpha_ = false;
+
DISALLOW_COPY_AND_ASSIGN(DirectRenderer);
};
« no previous file with comments | « blimp/client/support/compositor/blimp_embedder_compositor.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698