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

Unified Diff: cc/output/ca_layer_overlay.h

Issue 2017473002: cc: Lock resources directly in CALayerOverlay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/ca_layer_overlay.cc » ('j') | cc/output/ca_layer_overlay.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/ca_layer_overlay.h
diff --git a/cc/output/ca_layer_overlay.h b/cc/output/ca_layer_overlay.h
index 09dc7f83bb62c22e05ce8bc0fffa053b7742f009..883fcb400a44e70eb30ff4ea02f732e069b25f7e 100644
--- a/cc/output/ca_layer_overlay.h
+++ b/cc/output/ca_layer_overlay.h
@@ -6,6 +6,7 @@
#define CC_OUTPUT_CA_LAYER_OVERLAY_H_
#include "cc/quads/render_pass.h"
+#include "cc/resources/resource_provider.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkMatrix44.h"
#include "ui/gfx/geometry/rect_f.h"
@@ -13,23 +14,24 @@
namespace cc {
class DrawQuad;
-class ResourceProvider;
class CC_EXPORT CALayerOverlay {
public:
CALayerOverlay();
- CALayerOverlay(const CALayerOverlay& other);
+ CALayerOverlay(CALayerOverlay&& other);
~CALayerOverlay();
+ // Resource that corresponds to an IOSurface to set as the content of the
+ // CALayer. If this is nullptr then the CALayer is a solid color.
+ std::unique_ptr<ResourceProvider::ScopedReadLockGpuMemoryBuffer>
+ resource_lock;
+
// If |is_clipped| is true, then clip to |clip_rect| in the target space.
bool is_clipped = false;
gfx::RectF clip_rect;
// Layers in a non-zero sorting context exist in the same 3D space and should
// intersect.
unsigned sorting_context_id = 0;
- // Texture that corresponds to an IOSurface to set as the content of the
- // CALayer. If this is 0 then the CALayer is a solid color.
- unsigned contents_resource_id = 0;
// The contents rect property for the CALayer.
gfx::RectF contents_rect;
// The opacity property for the CAayer.
@@ -46,8 +48,6 @@ class CC_EXPORT CALayerOverlay {
unsigned filter;
};
-typedef std::vector<CALayerOverlay> CALayerOverlayList;
-
// Returns true if all quads in the root render pass have been replaced by
// CALayerOverlays.
bool ProcessForCALayerOverlays(ResourceProvider* resource_provider,
« no previous file with comments | « no previous file | cc/output/ca_layer_overlay.cc » ('j') | cc/output/ca_layer_overlay.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698