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

Unified Diff: cc/delegated_renderer_layer_impl.h

Issue 12340095: cc: Make damage on delegated frame damage the host layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 7 years, 10 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/delegated_renderer_layer.cc ('k') | cc/delegated_renderer_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/delegated_renderer_layer_impl.h
diff --git a/cc/delegated_renderer_layer_impl.h b/cc/delegated_renderer_layer_impl.h
index 0121b2e4e0cf01db0cb4266803e5f588afc0c0a8..1b4000853c7fce6ea0e058c3268e213ef77b5b0a 100644
--- a/cc/delegated_renderer_layer_impl.h
+++ b/cc/delegated_renderer_layer_impl.h
@@ -11,6 +11,7 @@
#include "cc/scoped_ptr_vector.h"
namespace cc {
+class DelegatedFrameData;
class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl {
public:
@@ -31,31 +32,34 @@ class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl {
virtual void appendQuads(
QuadSink& quad_sink, AppendQuadsData& append_quads_data) OVERRIDE;
+ // TODO(danakj): Make private
// This gives ownership of the RenderPasses to the layer.
void SetRenderPasses(ScopedPtrVector<RenderPass>&);
void ClearRenderPasses();
- // Set the size at which the frame should be displayed, with the origin at the
- // layer's origin. This must always contain at least the layer's bounds. A
- // value of (0, 0) implies that the frame should be displayed to fit exactly
- // in the layer's bounds.
- void set_display_size(gfx::Size size) { display_size_ = size; }
-
void AppendContributingRenderPasses(RenderPassSink* render_pass_sink);
- // Creates an ID with the resource provider for the child renderer
- // that will be sending quads to the layer.
- void CreateChildIdIfNeeded();
+ void SetFrameData(scoped_ptr<DelegatedFrameData> frame_data,
+ gfx::RectF damage_in_frame);
+
+ void SetDisplaySize(gfx::Size size);
+
int child_id() const { return child_id_; }
private:
DelegatedRendererLayerImpl(LayerTreeImpl* tree_impl, int id);
+ // Creates an ID with the resource provider for the child renderer
+ // that will be sending quads to the layer.
+ void CreateChildIdIfNeeded();
void ClearChildId();
RenderPass::Id ConvertDelegatedRenderPassId(
RenderPass::Id delegated_render_pass_id) const;
+ gfx::Transform DelegatedFrameToLayerSpaceTransform(gfx::Size frame_size)
+ const;
+
void AppendRenderPassQuads(
QuadSink* quad_sink,
AppendQuadsData* append_quads_data,
@@ -67,6 +71,7 @@ class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl {
ScopedPtrVector<RenderPass> render_passes_in_draw_order_;
base::hash_map<RenderPass::Id, int> render_passes_index_by_id_;
+
gfx::Size display_size_;
int child_id_;
};
« no previous file with comments | « cc/delegated_renderer_layer.cc ('k') | cc/delegated_renderer_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698