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

Unified Diff: cc/CCRenderPass.h

Issue 10989028: cc: Remove WebCore dependecies from CCRenderPass and CCDrawQuad classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
Index: cc/CCRenderPass.h
diff --git a/cc/CCRenderPass.h b/cc/CCRenderPass.h
index f1e9dedb2b71c1c674238fe1afd90ce32a59adba..e4f1ec57eaa859bd267ba28f3d034afa4e516d85 100644
--- a/cc/CCRenderPass.h
+++ b/cc/CCRenderPass.h
@@ -6,24 +6,28 @@
#define CCRenderPass_h
#include "CCDrawQuad.h"
-#include "CCOcclusionTracker.h"
#include "CCSharedQuadState.h"
-#include "FloatRect.h"
#include "SkColor.h"
#include "cc/hash_pair.h"
#include "cc/scoped_ptr_hash_map.h"
#include "cc/scoped_ptr_vector.h"
+#include <public/WebRect.h>
+#include <public/WebFloatRect.h>
#include <public/WebFilterOperations.h>
#include <public/WebTransformationMatrix.h>
-#include <wtf/Vector.h>
+#include <vector>
namespace cc {
class CCLayerImpl;
+template<typename LayerType, typename SurfaceType>
+class CCOcclusionTrackerBase;
class CCRenderSurface;
struct CCAppendQuadsData;
+typedef CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface> CCOcclusionTrackerImpl;
+
// A list of CCDrawQuad objects, sorted internally in front-to-back order.
class CCQuadList : public ScopedPtrVector<CCDrawQuad> {
public:
@@ -39,7 +43,6 @@ public:
typedef ScopedPtrVector<CCSharedQuadState> CCSharedQuadStateList;
class CCRenderPass {
- WTF_MAKE_NONCOPYABLE(CCRenderPass);
public:
~CCRenderPass();
@@ -58,7 +61,7 @@ public:
bool operator<(const Id& other) const { return layerId < other.layerId || (layerId == other.layerId && index < other.index); }
};
- static scoped_ptr<CCRenderPass> create(Id, IntRect outputRect, const WebKit::WebTransformationMatrix& transformToRootTarget);
+ static scoped_ptr<CCRenderPass> create(Id, WebKit::WebRect outputRect, const WebKit::WebTransformationMatrix& transformToRootTarget);
// A shallow copy of the render pass, which does not include its quads.
scoped_ptr<CCRenderPass> copy(Id newId) const;
@@ -76,10 +79,10 @@ public:
const WebKit::WebTransformationMatrix& transformToRootTarget() const { return m_transformToRootTarget; }
// This denotes the bounds in physical pixels of the output generated by this RenderPass.
- const IntRect& outputRect() const { return m_outputRect; }
+ const WebKit::WebRect& outputRect() const { return m_outputRect; }
- FloatRect damageRect() const { return m_damageRect; }
- void setDamageRect(FloatRect rect) { m_damageRect = rect; }
+ WebKit::WebFloatRect damageRect() const { return m_damageRect; }
+ void setDamageRect(WebKit::WebFloatRect rect) { m_damageRect = rect; }
const WebKit::WebFilterOperations& filters() const { return m_filters; }
void setFilters(const WebKit::WebFilterOperations& filters) { m_filters = filters; }
@@ -93,18 +96,20 @@ public:
bool hasOcclusionFromOutsideTargetSurface() const { return m_hasOcclusionFromOutsideTargetSurface; }
void setHasOcclusionFromOutsideTargetSurface(bool hasOcclusionFromOutsideTargetSurface) { m_hasOcclusionFromOutsideTargetSurface = hasOcclusionFromOutsideTargetSurface; }
protected:
- CCRenderPass(Id, IntRect outputRect, const WebKit::WebTransformationMatrix& transformToRootTarget);
+ CCRenderPass(Id, WebKit::WebRect outputRect, const WebKit::WebTransformationMatrix& transformToRootTarget);
Id m_id;
CCQuadList m_quadList;
CCSharedQuadStateList m_sharedQuadStateList;
WebKit::WebTransformationMatrix m_transformToRootTarget;
- IntRect m_outputRect;
- FloatRect m_damageRect;
+ WebKit::WebRect m_outputRect;
+ WebKit::WebFloatRect m_damageRect;
bool m_hasTransparentBackground;
bool m_hasOcclusionFromOutsideTargetSurface;
WebKit::WebFilterOperations m_filters;
WebKit::WebFilterOperations m_backgroundFilters;
+
+ DISALLOW_COPY_AND_ASSIGN(CCRenderPass);
};
} // namespace cc
@@ -128,7 +133,7 @@ struct hash<cc::CCRenderPass::Id> {
}
namespace cc {
-typedef Vector<CCRenderPass*> CCRenderPassList;
+typedef std::vector<CCRenderPass*> CCRenderPassList;
typedef ScopedPtrHashMap<CCRenderPass::Id, CCRenderPass> CCRenderPassIdHashMap;
} // namespace cc
« no previous file with comments | « cc/CCLayerTreeHostImplTest.cpp ('k') | cc/CCRenderPass.cpp » ('j') | cc/scoped_ptr_hash_map.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698