Combine projection matrix, and viewport management

Merge management of ortho projection matrix with the viewport size,
since they should always be changed together.

Change-Id: Iccb8f30828f4fb7848999ac54852e7ed2d6f2eb1
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 4f7f01e..b58b817 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -254,8 +254,8 @@
         return mSnapshot->clipRegion->isEmpty();
     }
 
-    int getViewportWidth() { return currentSnapshot()->viewport.getWidth(); }
-    int getViewportHeight() { return currentSnapshot()->viewport.getHeight(); }
+    int getViewportWidth() { return currentSnapshot()->getViewportWidth(); }
+    int getViewportHeight() { return currentSnapshot()->getViewportHeight(); }
 
     /**
      * Scales the alpha on the current snapshot. This alpha value will be modulated
@@ -354,12 +354,6 @@
 
 protected:
     /**
-     * Computes the projection matrix, initialize the first snapshot
-     * and stores the dimensions of the render target.
-     */
-    void initViewport(int width, int height);
-
-    /**
      * Perform the setup specific to a frame. This method does not
      * issue any OpenGL commands.
      */
@@ -930,9 +924,6 @@
      */
     Texture* getTexture(const SkBitmap* bitmap);
 
-    // Ortho matrix used for projection in shaders
-    mat4 mProjectionMatrix;
-
     /**
      * Model-view matrix used to position/size objects
      *