Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(584)

Unified Diff: src/core/SkBBoxHierarchyRecord.h

Issue 6490104: Add SkBBoxRecord subclass that builds up a BBoxHierarchy and PictureStateTree. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Add a few this->'s Created 12 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkBBoxHierarchyRecord.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBBoxHierarchyRecord.h
===================================================================
--- src/core/SkBBoxHierarchyRecord.h (revision 0)
+++ src/core/SkBBoxHierarchyRecord.h (working copy)
@@ -0,0 +1,51 @@
+
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkRTreeCanvas_DEFINED
+#define SkRTreeCanvas_DEFINED
+
+#include "SkBBoxRecord.h"
+
+/**
+ * This records bounding box information into an SkBBoxHierarchy, and clip/transform information
+ * into an SkPictureStateTree to allow for efficient culling and correct playback of draws.
+ */
+class SkBBoxHierarchyRecord : public SkBBoxRecord {
+public:
+ /** This will take a ref of h */
+ SkBBoxHierarchyRecord(uint32_t recordFlags, SkBBoxHierarchy* h);
+
+ virtual void handleBBox(const SkRect& bounds) SK_OVERRIDE;
+
+ virtual int save(SaveFlags flags = kMatrixClip_SaveFlag) SK_OVERRIDE;
+ virtual int saveLayer(const SkRect* bounds, const SkPaint* paint,
+ SaveFlags flags = kARGB_ClipLayer_SaveFlag) SK_OVERRIDE;
+ virtual void restore() SK_OVERRIDE;
+
+ virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE;
+ virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE;
+ virtual bool rotate(SkScalar degrees) SK_OVERRIDE;
+ virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE;
+ virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE;
+ virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE;
+
+ virtual bool clipRect(const SkRect& rect,
+ SkRegion::Op op = SkRegion::kIntersect_Op,
+ bool doAntiAlias = false) SK_OVERRIDE;
+ virtual bool clipRegion(const SkRegion& region,
+ SkRegion::Op op = SkRegion::kIntersect_Op) SK_OVERRIDE;
+ virtual bool clipPath(const SkPath& path,
+ SkRegion::Op op = SkRegion::kIntersect_Op,
+ bool doAntiAlias = false) SK_OVERRIDE;
+
+private:
+ typedef SkBBoxRecord INHERITED;
+};
+
+#endif
+
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkBBoxHierarchyRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b