CanvasState frame init refactor

bug:23760482

Change-Id: Idc0802b4b8a6a3cebd20797350f4eb01bcc3fe77
diff --git a/libs/hwui/CanvasState.h b/libs/hwui/CanvasState.h
index b35db28..f0fb9ba 100644
--- a/libs/hwui/CanvasState.h
+++ b/libs/hwui/CanvasState.h
@@ -71,20 +71,18 @@
  * (getClip/Matrix), but so that quickRejection can also be used.
  */
 
-class ANDROID_API CanvasState {
+class CanvasState {
 public:
     CanvasState(CanvasStateClient& renderer);
-    ~CanvasState();
 
     /**
      * Initializes the first snapshot, computing the projection matrix,
      * and stores the dimensions of the render target.
      */
-    void initializeSaveStack(float clipLeft, float clipTop, float clipRight, float clipBottom,
+    void initializeSaveStack(int viewportWidth, int viewportHeight,
+            float clipLeft, float clipTop, float clipRight, float clipBottom,
             const Vector3& lightCenter);
 
-    void setViewport(int width, int height);
-
     bool hasRectToRectTransform() const {
         return CC_LIKELY(currentTransform()->rectToRect());
     }
@@ -159,16 +157,11 @@
     int getHeight() const { return mHeight; }
     bool clipIsSimple() const { return currentSnapshot()->clipIsSimple(); }
 
-    inline const Snapshot* currentSnapshot() const {
-        return mSnapshot != nullptr ? mSnapshot.get() : mFirstSnapshot.get();
-    }
+    inline const Snapshot* currentSnapshot() const { return mSnapshot.get(); }
     inline Snapshot* writableSnapshot() { return mSnapshot.get(); }
     inline const Snapshot* firstSnapshot() const { return mFirstSnapshot.get(); }
 
 private:
-    /// No default constructor - must supply a CanvasStateClient (mCanvas).
-    CanvasState();
-
     /// indicates that the clip has been changed since the last time it was consumed
     bool mDirtyClip;