@Override
 protected void render(GLCanvas canvas) {
   canvas.save(GLCanvas.SAVE_FLAG_MATRIX);
   GalleryUtils.setViewPointMatrix(mMatrix, getWidth() / 2 + mX, getHeight() / 2 + mY, mZ);
   canvas.multiplyMatrix(mMatrix, 0);
   super.render(canvas);
   canvas.restore();
 }
        @Override
        protected void onLayout(boolean changed, int left, int top, int right, int bottom) {

          int slotViewTop = mActivity.getGalleryActionBar().getHeight() + mConfig.paddingTop;
          int slotViewBottom = bottom - top - mConfig.paddingBottom;
          int slotViewRight = right - left - mConfig.paddingRight;

          if (mShowDetails) {
            mDetailsHelper.layout(left, slotViewTop, right, bottom);
          } else {
            mAlbumView.setHighlightItemPath(null);
          }

          // Set the mSlotView as a reference point to the open animation
          mOpenCenter.setReferencePosition(mConfig.paddingLeft, slotViewTop);
          mSlotView.layout(mConfig.paddingLeft, slotViewTop, slotViewRight, slotViewBottom);
          GalleryUtils.setViewPointMatrix(
              mMatrix, (right - left) / 2, (bottom - top) / 2, -mUserDistance);
        }