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

Unified Diff: cc/layers/delegated_renderer_layer.h

Issue 26023004: aura: Allow delegated frames to be used by more than one impl layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: frameprovider: are_layers_attached checks Created 7 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 | « cc/layers/delegated_frame_resource_collection.cc ('k') | cc/layers/delegated_renderer_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/delegated_renderer_layer.h
diff --git a/cc/layers/delegated_renderer_layer.h b/cc/layers/delegated_renderer_layer.h
index 60e9c3c05d9df80a399539cba1b05e6195a59fa4..6cae1211965feace2b46d60355321200a5f34f1c 100644
--- a/cc/layers/delegated_renderer_layer.h
+++ b/cc/layers/delegated_renderer_layer.h
@@ -5,28 +5,31 @@
#ifndef CC_LAYERS_DELEGATED_RENDERER_LAYER_H_
#define CC_LAYERS_DELEGATED_RENDERER_LAYER_H_
+#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
#include "cc/base/cc_export.h"
+#include "cc/layers/delegated_frame_provider.h"
#include "cc/layers/layer.h"
#include "cc/resources/returned_resource.h"
namespace cc {
class BlockingTaskRunner;
-class DelegatedFrameData;
class DelegatedRendererLayerClient;
class CC_EXPORT DelegatedRendererLayer : public Layer {
public:
static scoped_refptr<DelegatedRendererLayer> Create(
- DelegatedRendererLayerClient* client);
+ DelegatedRendererLayerClient* client,
+ const scoped_refptr<DelegatedFrameProvider>& frame_provider);
virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
OVERRIDE;
virtual void SetLayerTreeHost(LayerTreeHost* host) OVERRIDE;
+ virtual bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker* occlusion) OVERRIDE;
virtual void PushPropertiesTo(LayerImpl* impl) OVERRIDE;
- virtual bool DrawsContent() const OVERRIDE;
// 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
@@ -34,32 +37,27 @@ class CC_EXPORT DelegatedRendererLayer : public Layer {
// in the layer's bounds.
void SetDisplaySize(gfx::Size size);
- void SetFrameData(scoped_ptr<DelegatedFrameData> frame_data);
-
- // Passes ownership of any unused resources that had been given by the child
- // compositor to the given array, so they can be given back to the child.
- void TakeUnusedResourcesForChildCompositor(ReturnedResourceArray* array);
+ // Called by the DelegatedFrameProvider when a new frame is available to be
+ // picked up.
+ void ProviderHasNewFrame();
protected:
- explicit DelegatedRendererLayer(DelegatedRendererLayerClient* client);
+ DelegatedRendererLayer(
+ DelegatedRendererLayerClient* client,
+ const scoped_refptr<DelegatedFrameProvider>& frame_provider);
virtual ~DelegatedRendererLayer();
private:
- void ReceiveUnusedResources(const ReturnedResourceArray& unused);
- static void ReceiveUnusedResourcesOnImplThread(
- scoped_refptr<BlockingTaskRunner> task_runner,
- base::WeakPtr<DelegatedRendererLayer> self,
- const ReturnedResourceArray& unused);
-
- scoped_ptr<DelegatedFrameData> frame_data_;
- gfx::RectF damage_in_frame_;
- gfx::Size frame_size_;
- gfx::Size display_size_;
-
DelegatedRendererLayerClient* client_;
- bool needs_filter_context_;
+ scoped_refptr<DelegatedFrameProvider> frame_provider_;
+
+ bool should_collect_new_frame_;
+
+ DelegatedFrameData* frame_data_;
+ gfx::RectF frame_damage_;
+
+ gfx::Size display_size_;
- ReturnedResourceArray unused_resources_for_child_compositor_;
scoped_refptr<BlockingTaskRunner> main_thread_runner_;
base::WeakPtrFactory<DelegatedRendererLayer> weak_ptrs_;
« no previous file with comments | « cc/layers/delegated_frame_resource_collection.cc ('k') | cc/layers/delegated_renderer_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698