1e1e6c66198e628f0784e1731bbdb775da479075bTim Murray/* 2e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * Copyright (C) 2008-2015 The Android Open Source Project 3e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * 4e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * Licensed under the Apache License, Version 2.0 (the "License"); 5e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * you may not use this file except in compliance with the License. 6e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * You may obtain a copy of the License at 7e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * 8e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * http://www.apache.org/licenses/LICENSE-2.0 9e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * 10e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * Unless required by applicable law or agreed to in writing, software 11e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * distributed under the License is distributed on an "AS IS" BASIS, 12e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * See the License for the specific language governing permissions and 14e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * limitations under the License. 15e1e6c66198e628f0784e1731bbdb775da479075bTim Murray */ 16e1e6c66198e628f0784e1731bbdb775da479075bTim Murray 17e1e6c66198e628f0784e1731bbdb775da479075bTim Murraypackage android.renderscript; 18e1e6c66198e628f0784e1731bbdb775da479075bTim Murray 19e1e6c66198e628f0784e1731bbdb775da479075bTim Murrayimport java.io.File; 20e1e6c66198e628f0784e1731bbdb775da479075bTim Murray 21e1e6c66198e628f0784e1731bbdb775da479075bTim Murray/** 22e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * Used only for tracking the RenderScript cache directory. 23e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * @hide 24e1e6c66198e628f0784e1731bbdb775da479075bTim Murray */ 25e1e6c66198e628f0784e1731bbdb775da479075bTim Murraypublic class RenderScriptCacheDir { 26e1e6c66198e628f0784e1731bbdb775da479075bTim Murray /** 27e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * Sets the directory to use as a persistent storage for the 28e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * renderscript object file cache. 29e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * 30e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * @hide 31e1e6c66198e628f0784e1731bbdb775da479075bTim Murray * @param cacheDir A directory the current process can write to 32e1e6c66198e628f0784e1731bbdb775da479075bTim Murray */ 33e1e6c66198e628f0784e1731bbdb775da479075bTim Murray public static void setupDiskCache(File cacheDir) { 34e1e6c66198e628f0784e1731bbdb775da479075bTim Murray // Defer creation of cache path to nScriptCCreate(). 35e1e6c66198e628f0784e1731bbdb775da479075bTim Murray mCacheDir = cacheDir; 36e1e6c66198e628f0784e1731bbdb775da479075bTim Murray } 37e1e6c66198e628f0784e1731bbdb775da479075bTim Murray 38e1e6c66198e628f0784e1731bbdb775da479075bTim Murray static File mCacheDir; 39e1e6c66198e628f0784e1731bbdb775da479075bTim Murray 40e1e6c66198e628f0784e1731bbdb775da479075bTim Murray} 41