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

Unified Diff: src/gpu/GrPictureUtils.h

Issue 719133002: Rename GrAccelData to SkLayerInfo and move it to src/core (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix up unit test Created 6 years, 1 month 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 | « src/gpu/GrLayerHoister.cpp ('k') | src/gpu/GrPictureUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPictureUtils.h
diff --git a/src/gpu/GrPictureUtils.h b/src/gpu/GrPictureUtils.h
deleted file mode 100644
index f24910507d5d453e3bbb0fcee2edef9de2f77162..0000000000000000000000000000000000000000
--- a/src/gpu/GrPictureUtils.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef GrPictureUtils_DEFINED
-#define GrPictureUtils_DEFINED
-
-#include "SkPicture.h"
-#include "SkTArray.h"
-
-// This class encapsulates the GPU-backend-specific acceleration data
-// for a single SkPicture
-class GrAccelData : public SkPicture::AccelData {
-public:
- // Information about a given saveLayer in an SkPicture
- class SaveLayerInfo {
- public:
- SaveLayerInfo() : fPicture(NULL), fPaint(NULL) {}
- ~SaveLayerInfo() { SkSafeUnref(fPicture); SkDELETE(fPaint); }
-
- // The picture owning the layer. If the owning picture is the top-most
- // one (i.e., the picture for which this GrAccelData was created) then
- // this pointer is NULL. If it is a nested picture then the pointer
- // is non-NULL and owns a ref on the picture.
- const SkPicture* fPicture;
- // The device space bounds of this layer.
- SkRect fBounds;
- // The pre-matrix begins as the identity and accumulates the transforms
- // of the containing SkPictures (if any). This matrix state has to be
- // part of the initial matrix during replay so that it will be
- // preserved across setMatrix calls.
- SkMatrix fPreMat;
- // The matrix state (in the leaf picture) in which this layer's draws
- // must occur. It will/can be overridden by setMatrix calls in the
- // layer itself. It does not include the translation needed to map the
- // layer's top-left point to the origin (which must be part of the
- // initial matrix).
- SkMatrix fLocalMat;
- // The paint to use on restore. Can be NULL since it is optional.
- const SkPaint* fPaint;
- // The ID of this saveLayer in the picture. 0 is an invalid ID.
- size_t fSaveLayerOpID;
- // The ID of the matching restore in the picture. 0 is an invalid ID.
- size_t fRestoreOpID;
- // True if this saveLayer has at least one other saveLayer nested within it.
- // False otherwise.
- bool fHasNestedLayers;
- // True if this saveLayer is nested within another. False otherwise.
- bool fIsNested;
- };
-
- GrAccelData(Key key) : INHERITED(key) { }
-
- virtual ~GrAccelData() { }
-
- SaveLayerInfo& addSaveLayerInfo() { return fSaveLayerInfo.push_back(); }
-
- int numSaveLayers() const { return fSaveLayerInfo.count(); }
-
- const SaveLayerInfo& saveLayerInfo(int index) const {
- SkASSERT(index < fSaveLayerInfo.count());
-
- return fSaveLayerInfo[index];
- }
-
- // We may, in the future, need to pass in the GPUDevice in order to
- // incorporate the clip and matrix state into the key
- static SkPicture::AccelData::Key ComputeAccelDataKey();
-
-private:
- SkTArray<SaveLayerInfo, true> fSaveLayerInfo;
-
- typedef SkPicture::AccelData INHERITED;
-};
-
-#endif // GrPictureUtils_DEFINED
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | src/gpu/GrPictureUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698