CN110400356A - Image texture control method, device, equipment and storage medium - Google Patents

Image texture control method, device, equipment and storage medium Download PDF

Info

Publication number
CN110400356A
CN110400356A CN201910547426.1A CN201910547426A CN110400356A CN 110400356 A CN110400356 A CN 110400356A CN 201910547426 A CN201910547426 A CN 201910547426A CN 110400356 A CN110400356 A CN 110400356A
Authority
CN
China
Prior art keywords
image texture
clearance
texture
duration
threshold value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910547426.1A
Other languages
Chinese (zh)
Inventor
钟谢伟
何思敏
郭肖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan United Imaging Healthcare Co Ltd
Original Assignee
Wuhan United Imaging Healthcare Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan United Imaging Healthcare Co Ltd filed Critical Wuhan United Imaging Healthcare Co Ltd
Priority to CN201910547426.1A priority Critical patent/CN110400356A/en
Publication of CN110400356A publication Critical patent/CN110400356A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

This application involves a kind of image texture control method, device, equipment and storage mediums, judge that duration threshold value is used to indicate the permission not used maximum time of cache image texture with the presence or absence of for clearance image texture of the duration greater than duration threshold value is not used in cache image texture;Image texture for clearance if it exists, then delete image texture for clearance, in the application, pass through the image texture for clearance for judging to be greater than duration threshold value in cache image texture with the presence or absence of unused duration, when there are image texture for clearance, delete image texture for clearance, so that deleting image texture is whether to be greater than time threshold and determination by judging the longest unused time of the image texture, avoid the case where corresponding image texture of the image data is directly deleted when image rendering is completed, and then it avoids and needs to carry out image data in the short time to repeat when rendering, need the case where re-creating image texture, improve the process degree of image rendering.

Description

Image texture control method, device, equipment and storage medium
Technical field
This application involves graphics rendering techniques fields, more particularly to a kind of image texture control method, device, equipment And storage medium.
Background technique
With the development of computer and network technology, many softwares can generate the figure that can be shown according to image data Picture, such as browser.
In the prior art, general by the corresponding image texture of creation image data, image data is rendered, is obtained To the image that can be shown.Also, when the image data, which renders, to be completed, the corresponding image texture of the image data is deleted, with It avoids due to image texture resource occupation video memory resource, the case where leading to video memory inadequate resource, and then lead to software crash.When again When secondary needs render the image data, the corresponding image texture of the image data is re-created, and pass through the image line Reason renders the image data, obtains the image that can be shown.
However the above method is used, there is a problem of that the fluency of image rendering is low.
Summary of the invention
Based on this, it is necessary to for the low problem of the fluency of image rendering, provide a kind of image texture control method, Device, equipment and storage medium.
In a first aspect, a kind of image texture control method, this method comprises:
Judge the image texture for clearance for being greater than duration threshold value in cache image texture with the presence or absence of unused duration, when Long threshold value is used to indicate the permission not used maximum time of cache image texture;
Image texture for clearance if it exists then deletes image texture for clearance.
Above-mentioned judgement is greater than duration with the presence or absence of duration is not used in cache image texture in one of the embodiments, The image texture for clearance of threshold value, comprising:
When reaching the preset cleaning moment, judge to be greater than duration with the presence or absence of unused duration in cache image texture The image texture for clearance of threshold value.
Above-mentioned judgement is greater than duration with the presence or absence of duration is not used in cache image texture in one of the embodiments, The image texture for clearance of threshold value, comprising:
If creating simultaneously cache image texture, judge to be greater than duration with the presence or absence of unused duration in cache image texture The image texture for clearance of threshold value.
Above-mentioned judgement is greater than duration with the presence or absence of duration is not used in cache image texture in one of the embodiments, The image texture for clearance of threshold value, comprising:
Whether cache image texture meets cleaning condition for judgement, and cleaning condition occupies video memory including cache image texture The sum of capacity is greater than capacity threshold, or, difference at the time of current time and last deletion image texture is greater than duration threshold value;
If cache image texture meets cleaning condition, judge in cache image texture with the presence or absence of image for clearance Texture.
If cache image texture meets cleaning condition, this method in one of the embodiments, further include:
If cache image texture occupies the sum of video memory capacity greater than capacity threshold, reduces duration threshold value, updated Duration threshold value afterwards;
Judge to whether there is image texture for clearance in cache image texture, comprising:
Judge the figure for clearance for being greater than updated duration threshold value in cache image texture with the presence or absence of unused duration As texture.
Above-mentioned judgement is greater than duration with the presence or absence of duration is not used in cache image texture in one of the embodiments, The image texture for clearance of threshold value, comprising:
Judge in cache image texture whether to include the target image texture not being cleaned at the last cleaning moment;
If judging whether the unused duration of target image texture is greater than duration threshold value including target image texture;
If the unused duration of target image texture is greater than duration threshold value, it is determined that target image texture is image for clearance Texture.
This method in one of the embodiments, further include:
If not including target image texture, judge to be greater than duration threshold with the presence or absence of unused duration in other image textures The image texture for clearance of value, other image textures are the image line in cache image texture in addition to target image texture Reason.
Second aspect, a kind of image texture control device, the device include:
Duration is not used greater than duration threshold value to clear for judging to whether there is in cache image texture in judgment module Manage image texture;Duration threshold value is used to indicate the not used maximum time of the image texture for allowing to have cached;
Image texture for clearance if it exists, then removing module, for deleting image texture for clearance.
The third aspect, a kind of computer equipment, including memory and processor, the memory are stored with computer journey Sequence, the processor realize method and step described in above-mentioned image texture control method when executing the computer program.
Fourth aspect, a kind of computer readable storage medium are stored thereon with computer program, the computer program quilt Processor realizes method and step described in above-mentioned image texture control method when executing.
Above-mentioned image texture control method, device, equipment and storage medium judge to whether there is in cache image texture The image texture for clearance that duration is greater than duration threshold value is not used, duration threshold value is used to indicate permission, and cache image texture does not make Maximum time;Image texture for clearance if it exists, then delete image texture for clearance, in the application, has been delayed by judgement It deposits with the presence or absence of for clearance image texture of the duration greater than duration threshold value is not used in image texture, when there are image lines for clearance When reason, image texture for clearance is deleted, so that deleting image texture is the longest unused time by judging the image texture Whether it is greater than time threshold and determination, avoids and directly delete the corresponding image line of the image data when image rendering is completed The case where reason, and then avoid and need to carry out image data in the short time to repeat when rendering, need to re-create the picture number The case where according to corresponding image texture, improves the process degree of image rendering.
Detailed description of the invention
Fig. 1 is the schematic diagram of the application environment of image texture control method in one embodiment;
Fig. 2 is the flow diagram of image texture control method in one embodiment;
Fig. 3 is the flow diagram of image texture control method in another embodiment;
Fig. 4 is the flow diagram of image texture control method in another embodiment;
Fig. 5 is the flow diagram of image texture control method in another embodiment;
Fig. 6 is the structural schematic diagram of the image texture control device provided in one embodiment;
Fig. 7 is the structural schematic diagram of the image texture control device provided in another embodiment;
Fig. 8 is the structural schematic diagram of the image texture control device provided in another embodiment;
Fig. 9 is the structural schematic diagram of the image texture control device provided in another embodiment;
Figure 10 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
Image texture control method, device, equipment and storage medium provided by the present application, it is intended to solve the stream of image rendering Freely spend low problem.Embodiment will be passed through below and in conjunction with attached drawing specifically to the technology of the technical solution of the application and the application How scheme, which solves above-mentioned technical problem, is described in detail.These specific embodiments can be combined with each other below, for The same or similar concept or process may repeat no more in certain embodiments.
Image texture control method provided in this embodiment, can be adapted in application environment as shown in Figure 1.Wherein scheme As texture controlling terminal 102 is communicated by network with server 104.Image texture controlling terminal 102 can be, but not limited to It is various personal computers, laptop, smart phone, tablet computer and portable wearable device.Server 104 can be with It is realized with the server cluster of the either multiple server compositions of independent server.
It should be noted that image texture control method provided by the embodiments of the present application, executing subject can be image Texture control device, the device can be implemented as image texture control by way of software, hardware or software and hardware combining Terminal part or whole.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.
Fig. 2 is the flow diagram of image texture control method in one embodiment.The present embodiment what is involved is how root The detailed process of image texture is deleted according to the unused time of image texture.As shown in Fig. 2, method includes the following steps:
S101, judge the image line for clearance for being greater than duration threshold value in cache image texture with the presence or absence of unused duration Reason, duration threshold value are used to indicate the permission not used maximum time of cache image texture.Image texture for clearance if it exists, then Execute S102.
Specifically, cache image texture can be the image texture cached in terminal, the unused duration of image texture It can be determined with the image texture last time using the difference between moment and current time, wherein if image texture creates It is not used by always afterwards, then the image texture last time is the establishment moment of the image texture using the moment.Duration threshold value is for referring to Show the permission not used maximum time of cache image texture.Image texture for clearance is is not used in cache image texture when The long image texture for being greater than duration threshold value.
It, can be by obtaining each image when whether there is image texture for clearance in specific judgement cache image texture The texture last time using difference between moment and current time, come judge each image texture last time try out the moment and it is current when Whether the difference between quarter is greater than duration threshold value, so determine in cache image texture whether image texture for clearance.Terminal Preset interval duration threshold value can be spaced to judge in cache image texture with the presence or absence of image texture for clearance, it can also be with It is when creating new image texture, to judge that, with the presence or absence of image texture for clearance in cache image texture, the application is real It is without limitation to apply example.Terminal, which may determine that, whether there is image texture for clearance in all textures of cache image, can also To be to judge in terminal part according to user setting in cache image texture with the presence or absence of image texture for clearance, the application is real It is without limitation to apply example.For example, 5 image textures have been cached in terminal altogether, respectively image texture 1, image texture 2, figure As texture 3, image texture 4 and image texture 5, wherein determine that image texture 3 is not delete image texture according to user setting, Then above-mentioned judgement cache image texture whether there is image texture for clearance, can be judge image texture 1, image texture 2, It whether there is image texture for clearance in image texture 4 and image texture 5.
S102, image texture for clearance is deleted.
Specifically, on the basis of the above embodiments, the image for clearance that duration is greater than duration threshold value is not used if it exists Texture can delete each image texture for clearance.Wherein delete image texture for clearance, can be by image texture for clearance from It deletes, is also possible to image texture for clearance from needing to delete in the application program for carrying out image rendering, the application in terminal Embodiment is without limitation.For example, when terminal carries out image rendering by image texture in a browser, image texture caching In the corresponding memory of browser, when there are image texture for clearance, terminal can be by image texture for clearance from browser It is deleted in corresponding memory.Terminal can determined there are when image texture for clearance, delete image texture for clearance immediately; It can be spaced after preset interval duration, image texture for clearance is deleted;If image texture for clearance is multiple images line When reason, terminal can also successively delete each image texture for clearance according to preset order, and the embodiment of the present application does not limit this System.
Above-mentioned image texture control method judges to be greater than duration threshold with the presence or absence of unused duration in cache image texture The image texture for clearance of value, wherein duration threshold value is used to indicate the permission not used maximum time of cache image texture, if There are image textures for clearance, then delete image texture for clearance, in the present embodiment, are in cache image texture by judging The no image texture for clearance that there is unused duration and be greater than duration threshold value is deleted when there are image texture for clearance to clear Image texture is managed, so that deleting image texture is by judging whether the longest unused time of the image texture is greater than time threshold Value and determine, avoid the case where corresponding image texture of the image data is directly deleted when image rendering is completed, in turn It avoids and needs to carry out image data in the short time to repeat when rendering, need to re-create the corresponding image line of the image data The case where reason, improves the process degree of image rendering.
When terminal can be according to preset interval duration, when timing judges in cache image texture with the presence or absence of being not used The long image texture for clearance for being greater than duration threshold value is also possible to judge cache image texture when creating new image texture In with the presence or absence of be not used duration be greater than duration threshold value image texture for clearance, come specifically below by following embodiments It is bright.
Optionally, when reaching the preset cleaning moment, judge in cache image texture with the presence or absence of unused duration Greater than the image texture for clearance of duration threshold value.
Specifically, the preset cleaning moment can be multiple cleaning moment of terminal setting, can be interval fixation Multiple cleaning moment that time interval obtains are also possible to be instructed according to the setting of user, it is unfixed more to obtain time interval A cleaning moment, the embodiment of the present application was without limitation as the preset cleaning moment.For example, can by be spaced 5 seconds when It carves and is used as the preset cleaning moment, be also possible to be used as the preset cleaning moment for the 3rd second, the 7th second, the 12nd second and the 20th second. When reaching the preset cleaning moment, judgement in cache image texture with the presence or absence of be not used duration be greater than duration threshold value to Clear up image texture.
Optionally, if creation and cache image texture, judge in cache image texture with the presence or absence of unused duration Greater than the image texture for clearance of duration threshold value.
Specifically, terminal can be in creation and when cache image texture, judge in cache image texture immediately whether There are the image texture for clearance that unused duration is greater than duration threshold value, it is also possible to after creation and cache image texture, It is spaced preset time interval, is judged for clearance greater than duration threshold value with the presence or absence of duration is not used in cache image texture Image texture, the embodiment of the present application are without limitation.
Fig. 3 is flow diagram of another implementation example figure as texture control method.What is involved is how to sentence for the present embodiment It is greater than the detailed process of the image texture for clearance of duration threshold value in disconnected cache image texture with the presence or absence of unused duration.Such as Shown in Fig. 3, above-mentioned S101 " judges the figure for clearance for being greater than duration threshold value in cache image texture with the presence or absence of unused duration As texture " a kind of possible implementation method the following steps are included:
Whether cache image texture meets cleaning condition for S201, judgement, and cleaning condition is accounted for including cache image texture It is greater than capacity threshold with the sum of video memory capacity, or, difference at the time of current time and last deletion image texture is greater than duration Threshold value, if so, executing S202.
Specifically, cleaning condition may include cache image texture occupy the sum of video memory capacity and be greater than capacity threshold, or Difference at the time of person, current time and last time delete image texture is greater than duration threshold value.Wherein cache image texture can wrap One or more image texture is included, when including multiple images texture for having cached, respectively cache image texture needs are accounted for With video memory capacity, capacity threshold can serve to indicate that can cache image texture maximum capacity, can be according to user setting Obtained maximum capacity is also possible to the maximum available by obtaining video memory as capacity threshold, the embodiment of the present application pair This is with no restrictions.Terminal can occupy the capacity of video memory by obtaining each cache image texture respectively, and will respectively cache figure It as the capacity addition of texture occupancy video memory, obtains cache image texture and occupies the sum of video memory capacity, and then will obtain having delayed Deposit image texture and occupy the sum of video memory capacity and be compared with capacity threshold, obtain cache image texture occupy video memory capacity it Whether capacity threshold is greater than.Meanwhile terminal available last time at the time of delete image texture, and then according to current time with Last time deletes difference at the time of image texture, when judging whether difference at the time of current time and last time delete image texture is greater than Long threshold value.In summary two aspect, when, the sum of cache image texture occupancy video memory capacity is greater than capacity threshold, and current time And difference at the time of last time deletes image texture is greater than duration threshold value, then cache image texture meets cleaning condition;When having delayed It deposits the sum of image texture occupancy video memory capacity and is greater than capacity threshold, and difference at the time of current time and last time deletion image texture No more than duration threshold value, then cache image texture meets cleaning condition;When, cache image texture occupies the sum of video memory capacity No more than capacity threshold, and difference at the time of current time and last time deletion image texture is greater than duration threshold value, then has cached figure As texture meets cleaning condition;When, the sum of cache image texture occupancy video memory capacity is not more than capacity threshold, and current time And difference at the time of last time deletes image texture is not more than duration threshold value, then cache image texture meets unclear manage bar part.
S202, judge to whether there is image texture for clearance in cache image texture.
Specifically, on the basis of the above embodiments, it is greater than capacity when cache image texture occupies the sum of video memory capacity Threshold value, and difference at the time of current time and last time deletion image texture is greater than duration threshold value;When, cache image texture is occupied The sum of video memory capacity is greater than capacity threshold, and difference at the time of current time and last time deletion image texture is not more than duration threshold Value;When, cache image texture occupies the sum of video memory capacity no more than capacity threshold, and current time and last time delete image line Difference at the time of reason is greater than duration threshold value;In these three cases, cache image texture meets cleaning condition.In other words, At above-mentioned three kinds, judge for clearance greater than duration threshold value with the presence or absence of duration is not used in cache image texture Image texture.
Above-mentioned image texture control method, in creation and cache image texture, whether cache image texture is full for judgement Foot cleaning condition, cleaning condition occupies the sum of video memory capacity including cache image texture and is greater than capacity threshold, or, current time And the difference at the time of last time deletes image texture is greater than duration threshold value and sentences if cache image texture meets cleaning condition It whether there is image texture for clearance in disconnected cache image texture, so that when creating and caching new image texture, all roots The sum of video memory capacity is occupied according to cache image texture and is greater than capacity threshold, or, current time and last deletion image texture At the time of difference be greater than duration threshold value cleaning condition judgement cache image texture whether meet cleaning condition, it is refined to have cached figure As texture meets cleaning condition, then further judgement whether there is image texture for clearance in cache image texture, and deposit In the case where image texture for clearance, image texture for clearance is deleted, so that cache image texture meets occupancy video memory appearance The sum of amount is not more than capacity threshold, and, difference at the time of current time and last time delete image texture is not more than duration threshold value The two conditions avoid the case where image texture occupies video memory capacity for a long time, and then avoid video memory inadequate resource and cause The case where software crash.
On the basis of the above embodiments, if cache image texture has met the texture of cache image in cleaning condition and accounts for When being greater than this condition of capacity threshold with the sum of video memory capacity, updated duration threshold can be obtained by reducing duration threshold value Value, and then according to updated duration threshold value, judge to whether there is image texture for clearance in cache image texture.
Fig. 4 is flow diagram of another implementation example figure as texture control method.What is involved is ought delay for the present embodiment When depositing the sum of image texture occupancy video memory capacity greater than capacity threshold, how according to updated duration threshold value, judgement has been cached It whether there is the detailed process of image texture for clearance in image texture.As shown in figure 4, method includes the following steps:
If S301, cache image texture, which occupy the sum of video memory capacity, is greater than capacity threshold, reduces duration threshold value, obtain Updated duration threshold value.
Specifically, if cache image texture occupies the sum of video memory capacity greater than capacity threshold, reduction allows to have cached The not used maximum time of image texture, i.e. duration threshold value obtain updated duration threshold value.In general, when updated Long threshold value is less than initial duration threshold value.When specifically reducing duration threshold value, it can be instructed according to user setting and reduce duration Threshold value, can also be automatic to reduce duration threshold by the method for artificial intelligence according to respectively duration is not used in cache image texture Value, the embodiment of the present application are without limitation.For example, if cache image texture occupies the sum of video memory capacity greater than capacity threshold When, duration threshold value is 5 seconds at this time, " reducing duration threshold value every time 1 second " can be instructed according to user setting, when obtaining updated Long threshold value is 4 seconds.
S302, judge to whether there is unused duration in cache image texture greater than updated duration threshold value to clear Manage image texture.
Specifically, on the basis of the above embodiments, if cache image texture occupies the sum of video memory capacity greater than capacity Threshold value then reduces duration threshold value, obtains updated duration threshold value, then may determine that in cache image texture with the presence or absence of not It is greater than the image texture for clearance of updated duration threshold value using duration.
Above-mentioned image texture control method, if the sum of cache image texture occupancy video memory capacity is greater than capacity threshold, Reduce duration threshold value, obtain updated duration threshold value, judges to be greater than in cache image texture with the presence or absence of unused duration The image texture for clearance of updated duration threshold value occupies the sum of video memory capacity in cache image texture and is greater than capacity threshold In the case where, by reducing duration threshold value, duration threshold value after being updated, so that in the texture of cache image that judgement obtains not It is in other words obtained by updated duration threshold value using the image texture for clearance that duration is greater than updated duration threshold value The image texture for clearance arrived, the image texture for clearance than being obtained by duration threshold value is more, so that when creating new image line When reason, cache image texture occupies the sum of video memory capacity greater than capacity threshold, is obtained more by updated duration threshold value Image texture for clearance, by deleting more image textures for clearance, so that cache image texture occupies video memory capacity The sum of be not more than capacity threshold, avoid caused by creating new image texture that cache image texture occupies the sum of video memory capacity The case where greater than capacity threshold, and then avoid image texture and occupy video memory capacity for a long time so that video memory inadequate resource and cause The case where software crash.
Flow diagram of another implementation example figure of Fig. 5 as texture control method.What is involved is judgements to have delayed for the present embodiment Deposit the detailed process for being greater than the image texture for clearance of duration threshold value in image texture with the presence or absence of unused duration.Such as Fig. 5 institute Show, above-mentioned S101 " judges the image line for clearance for being greater than duration threshold value in cache image texture with the presence or absence of unused duration A kind of possible implementation method of reason " the following steps are included:
S401, judge in cache image texture whether to include the target image line not being cleaned at the last cleaning moment Reason, if so, executing S402.
Specifically, the last cleaning moment can be current time before the recent cleaning moment, target image line Reason can be not yet used image texture.Target image texture can be to be created before the upper primary cleaning moment, It can be and created after the upper primary cleaning moment, the embodiment of the present application is without limitation.For example, setting interval 10 seconds is The primary cleaning moment, then clearing up the moment is the 10th second, the 20th second, the 30th second ..., and cache image texture is not used for permission Maximum time is 8 seconds, creates an image texture 1 at the 15th second, when reaching second the cleaning moment the 20th second the time, At this time the longest unused time of image texture 1 be 5 seconds, be not more than duration threshold value, and be in unused state, then the 20th second when It is not cleaned, image texture 1 is above-mentioned target image texture at this time.
S402, judge whether the unused duration of target image texture is greater than duration threshold value.
Specifically, on the basis of the above embodiments, if it exists target image texture when, can creation and cache image When texture, judge whether the unused duration of target image texture is greater than duration threshold value.Continue with target listed in S401 For image texture, setting interval 10 seconds is the primary cleaning moment, then clearing up the moment is the 10th second, the 20th second, the 30th second ..., The not used maximum time of cache image texture is 8 seconds for permission, created an image texture 1 at the 15th second, works as the time When reaching second the cleaning moment the 20th second, the longest unused time of image texture 1 is 5 seconds at this time, is not more than duration threshold value, And be in unused state, then the 20th second when be not cleaned.Image texture 1 is above-mentioned target image texture.If the 22nd second When creating and caching another image texture 2, the longest unused time of the image texture 1 as target image texture is 7 Second, it is not more than duration threshold value.Figure if create at the 27th second and cache another image texture 3, as target image texture As texture 1 longest unused time be 12 seconds, be greater than duration threshold value.
Optionally, if not including target image texture, judge to grow up in other image textures with the presence or absence of when being not used In the image texture for clearance of duration threshold value, other image textures are in cache image texture in addition to target image texture Image texture.
Specifically, on the basis of the above embodiments, if without not yet used target figure in cache image texture When as texture, then the image texture for clearance for being greater than duration threshold value in other image textures with the presence or absence of unused duration is judged, Wherein, other image textures are the image texture in cache image texture in addition to target image texture, due to target image Texture is still not used image texture, then other image textures are to have cached and used image texture.In other words, if When not included target texture in cache image texture, then judges to have cached and whether there is in other used image textures The image texture for clearance that duration is greater than duration threshold value is not used.
If the unused duration of S403, target image texture is greater than duration threshold value, it is determined that target image texture is to clear Manage image texture.
Specifically, on the basis of S402 illustrated embodiment, the unused duration of target image texture can be greater than duration Threshold value can also be not more than duration threshold value, and the target image texture for determining that unused duration is greater than duration threshold value is figure for clearance As texture.For example, setting interval 10 seconds is the primary cleaning moment, then clearing up the moment is the 10th second, the 20th second, the 30th second ..., The not used maximum time of cache image texture is 8 seconds for permission, created an image texture 1 at the 15th second, works as the time When reaching second the cleaning moment the 20th second, the longest unused time of image texture 1 is 5 seconds at this time, is not more than duration threshold value, And be in unused state, then the 20th second when be not cleaned, image texture 1 is above-mentioned target image texture.When the 27th second When creating and caching another image texture 2, the longest unused time of the image texture 1 as target image texture is 12 Second, it is greater than duration threshold value, then regard target image texture 1 as image texture for clearance.
Above-mentioned image texture control method, when creation and when cache image texture, judgement in cache image texture whether Target image texture including not being cleaned at the last cleaning moment judges target image if including target image texture Whether the unused duration of texture is greater than duration threshold value, if the unused duration of target image texture is greater than duration threshold value, really The image texture that sets the goal is image texture for clearance, and terminal is allowed whether to determine unused duration from target image texture Greater than the image texture for clearance of duration threshold value, so that not needing to traverse all caching figures when determining image texture for clearance As texture, the efficiency for determining image texture for clearance is improved.
Although should be understood that each step in the flow chart of Fig. 2-5 according to the instruction of arrow, is successively shown, It is these steps is not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps There is no stringent sequences to limit for rapid execution, these steps can execute in other order.Moreover, in Fig. 2-5 at least A part of step may include that perhaps these sub-steps of multiple stages or stage are not necessarily in same a period of time to multiple sub-steps Quarter executes completion, but can execute at different times, the execution in these sub-steps or stage be sequentially also not necessarily according to Secondary progress, but in turn or can replace at least part of the sub-step or stage of other steps or other steps Ground executes.
Fig. 6 is the structural schematic diagram of the image texture control device provided in one embodiment, as shown in fig. 6, the image Texture control device includes: judgment module 10 and removing module 20, in which:
Judgment module 10, for judge in cache image texture with the presence or absence of be not used duration be greater than duration threshold value to Clear up image texture;Duration threshold value is used to indicate the not used maximum time of the image texture for allowing to have cached;
Image texture for clearance if it exists, then removing module 20, for deleting image texture for clearance.
In one embodiment, when reaching the preset cleaning moment, judgment module 10 is for judging cache image line It is greater than the image texture for clearance of duration threshold value in reason with the presence or absence of unused duration.
In one embodiment, if creation and cache image texture, judgment module 10 is for judging cache image line It is greater than the image texture for clearance of duration threshold value in reason with the presence or absence of unused duration.
Image texture control device provided by the embodiments of the present application, can execute above method embodiment, realization principle Similar with technical effect, details are not described herein.
Fig. 7 is the structural schematic diagram of the image texture control device provided in another embodiment, embodiment shown in Fig. 6 On the basis of, as shown in fig. 7, judgment module 10 includes: the first judging unit 101 and second judgment unit 102, in which:
First judging unit 101, for judging whether cache image texture meets cleaning condition, and cleaning condition includes Cache image texture occupies the sum of video memory capacity and is greater than capacity threshold, or, current time and it is last delete image texture when The difference carved is greater than duration threshold value;
If cache image texture meets cleaning condition, second judgment unit 102, for judging cache image texture In whether there is image texture for clearance.
Image texture control device provided by the embodiments of the present application, can execute above method embodiment, realization principle Similar with technical effect, details are not described herein.
Fig. 8 is the structural schematic diagram of the image texture control device provided in another embodiment, shown in Fig. 6 or Fig. 7 On the basis of embodiment, as shown in figure 8, judgment module 10 further include: updating unit 103, in which:
If cache image texture occupies the sum of video memory capacity greater than capacity threshold, updating unit 103 is for when reducing Long threshold value obtains updated duration threshold value;
After second judgment unit 102 is also used to judge in cache image texture with the presence or absence of duration is not used greater than updating Duration threshold value image texture for clearance.
Image texture control device provided by the embodiments of the present application, can execute above method embodiment, realization principle Similar with technical effect, details are not described herein.
Fig. 9 is the structural schematic diagram of the image texture control device provided in another embodiment, in any one of Fig. 6-8 institute On the basis of showing embodiment, as shown in figure 9, judgment module 10 further include: third judging unit 104 and determination unit 105, In:
Third judging unit 104, for judge whether to be included in cache image texture the last cleaning moment not by The target image texture of cleaning;
If including target image texture, second judgment unit 102 be also used to judge target image texture it is unused when It is long whether to be greater than duration threshold value;
If whether the unused duration of target image texture is greater than duration threshold value, it is determined that unit 104 is for determining target Image texture is image texture for clearance.
In one embodiment, if not including target image texture, second judgment unit 102 is also used to break other images With the presence or absence of for clearance image texture of the duration greater than duration threshold value is not used in texture, other image textures are cache image Image texture in texture in addition to target image texture.
It should be noted that Fig. 9 is based on being shown on the basis of Fig. 8, certain Fig. 9 can also be based on Fig. 6 or Fig. 7 Structure shown, be only a kind of example here.
Image texture control device provided by the embodiments of the present application, can execute above method embodiment, realization principle Similar with technical effect, details are not described herein.
A kind of specific restriction about image texture control device may refer to above to image texture control method It limits, details are not described herein.Modules in above-mentioned image texture control device can fully or partially through software, hardware and A combination thereof is realized.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also Be stored in the memory in computer equipment in a software form, in order to which processor calls the above modules of execution corresponding Operation.
In one embodiment, a kind of computer equipment is provided, which can be terminal device, inside Structure chart can be as shown in Figure 10.The computer equipment includes that the processor, memory, network connected by system bus connects Mouth, display screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer The memory of equipment includes non-volatile memory medium, built-in storage.The non-volatile memory medium be stored with operating system and Computer program.The built-in storage provides ring for the operation of operating system and computer program in non-volatile memory medium Border.The network interface of the computer equipment is used to communicate with external terminal by network connection.The computer program is processed To realize a kind of image texture control method when device executes.The display screen of the computer equipment can be liquid crystal display or electricity Sub- ink display screen, the input unit of the computer equipment can be the touch layer covered on display screen, be also possible to computer Key, trace ball or the Trackpad being arranged on device housings can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Figure 10, only part relevant to application scheme The block diagram of structure, does not constitute the restriction for the computer equipment being applied thereon to application scheme, and specific computer is set Standby may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of terminal device, including memory and processor are provided, the memory is stored with Computer program, the processor perform the steps of when executing the computer program
Judge the image texture for clearance for being greater than duration threshold value in cache image texture with the presence or absence of unused duration, when Long threshold value is used to indicate the permission not used maximum time of cache image texture;
Image texture for clearance if it exists then deletes image texture for clearance.
In one embodiment, it is also performed the steps of when processor executes computer program when the preset cleaning of arrival When the moment, the image texture for clearance for being greater than duration threshold value in cache image texture with the presence or absence of unused duration is judged.
In one embodiment, if processor also performs the steps of creation and cache image when executing computer program Texture then judges the image texture for clearance for being greater than duration threshold value in cache image texture with the presence or absence of unused duration.
In one embodiment, judgement cache image line is also performed the steps of when processor executes computer program Whether reason meets cleaning condition, and cleaning condition occupies the sum of video memory capacity including cache image texture and is greater than capacity threshold, or, Difference at the time of current time and last deletion image texture is greater than duration threshold value;If cache image texture meets cleaning item Part then judges in cache image texture with the presence or absence of image texture for clearance.
In one embodiment, if processor also performs the steps of cache image texture when executing computer program It occupies the sum of video memory capacity and is greater than capacity threshold, then reduce duration threshold value, obtain updated duration threshold value;Judgement has cached figure Image texture for clearance as being greater than updated duration threshold value in texture with the presence or absence of unused duration.
In one embodiment, judgement cache image line is also performed the steps of when processor executes computer program It whether include the target image texture not being cleaned at the last cleaning moment in reason;If judging including target image texture Whether the unused duration of target image texture is greater than duration threshold value;If whether the unused duration of target image texture is greater than Long threshold value, it is determined that target image texture is image texture for clearance.
In one embodiment, if it does not include target image that processor also performs the steps of when executing computer program Texture then judges the image texture for clearance for being greater than duration threshold value in other image textures with the presence or absence of unused duration, other Image texture is the image texture in cache image texture in addition to target image texture.
Terminal device provided in this embodiment, implementing principle and technical effect are similar with above method embodiment, herein It repeats no more.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
Judge the image texture for clearance for being greater than duration threshold value in cache image texture with the presence or absence of unused duration, when Long threshold value is used to indicate the permission not used maximum time of cache image texture;
Image texture for clearance if it exists then deletes image texture for clearance.
In one embodiment, it is performed the steps of when computer program is executed by processor when the preset cleaning of arrival When the moment, the image texture for clearance for being greater than duration threshold value in cache image texture with the presence or absence of unused duration is judged.
In one embodiment, if performing the steps of creation and cache image when computer program is executed by processor Texture then judges the image texture for clearance for being greater than duration threshold value in cache image texture with the presence or absence of unused duration.
In one embodiment, judgement cache image line is performed the steps of when computer program is executed by processor Whether reason meets cleaning condition, and cleaning condition occupies the sum of video memory capacity including cache image texture and is greater than capacity threshold, or, Difference at the time of current time and last deletion image texture is greater than duration threshold value;If cache image texture meets cleaning item Part then judges in cache image texture with the presence or absence of image texture for clearance.
In one embodiment, if performing the steps of cache image texture when computer program is executed by processor It occupies the sum of video memory capacity and is greater than capacity threshold, then reduce duration threshold value, obtain updated duration threshold value;Judgement has cached figure Image texture for clearance as being greater than updated duration threshold value in texture with the presence or absence of unused duration.
In one embodiment, judgement cache image line is performed the steps of when computer program is executed by processor It whether include the target image texture not being cleaned at the last cleaning moment in reason;If judging including target image texture Whether the unused duration of target image texture is greater than duration threshold value;If whether the unused duration of target image texture is greater than Long threshold value, it is determined that target image texture is image texture for clearance.
It in one embodiment, does not include target image if being performed the steps of when computer program is executed by processor Texture then judges the image texture for clearance for being greater than duration threshold value in other image textures with the presence or absence of unused duration, other Image texture is the image texture in cache image texture in addition to target image texture.
Computer readable storage medium provided in this embodiment, implementing principle and technical effect and above method embodiment Similar, details are not described herein.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of image texture control method, which is characterized in that the described method includes:
The image texture for clearance for being greater than duration threshold value in cache image texture with the presence or absence of unused duration is judged, when described Long threshold value is used to indicate the permission not used maximum time of cache image texture;
The image texture for clearance if it exists then deletes the image texture for clearance.
2. method according to claim 1, which is characterized in that described to judge in cache image texture with the presence or absence of unused Duration is greater than the image texture for clearance of duration threshold value, comprising:
When reaching the preset cleaning moment, judge to be greater than duration threshold value with the presence or absence of unused duration in cache image texture Image texture for clearance.
3. method according to claim 1, which is characterized in that described to judge in cache image texture with the presence or absence of unused Duration is greater than the image texture for clearance of duration threshold value, comprising:
If creating simultaneously cache image texture, judge to be greater than the duration with the presence or absence of unused duration in cache image texture The image texture for clearance of threshold value.
4. according to the method described in claim 3, it is characterized in that, the judgement is not in cache image texture with the presence or absence of making The used time long image texture for clearance for being greater than the duration threshold value, comprising:
Whether the judgement cache image texture meets cleaning condition, and the cleaning condition is occupied including cache image texture The sum of video memory capacity is greater than capacity threshold, or, when difference at the time of current time and last deletion image texture is greater than described Long threshold value;
If meeting the cleaning condition, judge in cache image texture with the presence or absence of the image texture for clearance.
5. method according to claim 4, which is characterized in that if the texture of cache image meets the cleaning item Part, then the method also includes:
If cache image texture occupies the sum of video memory capacity greater than the capacity threshold, reduces the duration threshold value, obtain Updated duration threshold value;
It is described to judge to whether there is the image texture for clearance in cache image texture, comprising:
Judge the figure for clearance for being greater than the updated duration threshold value in cache image texture with the presence or absence of unused duration As texture.
6. method according to claim 3, which is characterized in that described to judge in cache image texture with the presence or absence of unused Duration is greater than the image texture for clearance of the duration threshold value, comprising:
Judge in cache image texture whether to include the target image texture not being cleaned at the last cleaning moment;
If judging whether the unused duration of the target image texture is greater than the duration including the target image texture Threshold value;
If the unused duration of the target image texture is greater than the duration threshold value, it is determined that the target image texture is institute State image texture for clearance.
7. method according to claim 6, which is characterized in that the method also includes:
If not including the target image texture, judge to be greater than duration threshold with the presence or absence of unused duration in other image textures The image texture for clearance of value, other described image textures are in cache image texture in addition to the target image texture Image texture.
8. a kind of image texture managing device, which is characterized in that described device includes:
Judgment module, the figure for clearance for judging to be greater than duration threshold value in cache image texture with the presence or absence of unused duration As texture;The duration threshold value is used to indicate the not used maximum time of the image texture for allowing to have cached;
The image texture for clearance if it exists, then removing module, for deleting the image texture for clearance.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In when the processor executes the computer program the step of any one of realization claim 1-7 the method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method of any of claims 1-7 is realized when being executed by processor.
CN201910547426.1A 2019-06-24 2019-06-24 Image texture control method, device, equipment and storage medium Pending CN110400356A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910547426.1A CN110400356A (en) 2019-06-24 2019-06-24 Image texture control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910547426.1A CN110400356A (en) 2019-06-24 2019-06-24 Image texture control method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110400356A true CN110400356A (en) 2019-11-01

Family

ID=68323456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910547426.1A Pending CN110400356A (en) 2019-06-24 2019-06-24 Image texture control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110400356A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112370771A (en) * 2020-10-20 2021-02-19 广州西山居世游网络科技有限公司 Game running memory dynamic adjusting method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6894693B1 (en) * 2001-02-09 2005-05-17 Vicarious Visions Inc. Management of limited resources in a graphics system
US7050061B1 (en) * 1999-06-09 2006-05-23 3Dlabs Inc., Ltd. Autonomous address translation in graphic subsystem
CN104599315A (en) * 2014-12-09 2015-05-06 深圳市腾讯计算机系统有限公司 Three-dimensional scene construction method and system
CN106227744A (en) * 2016-07-12 2016-12-14 努比亚技术有限公司 Terminal document managing device, terminal and terminal document management method
CN108959505A (en) * 2018-06-27 2018-12-07 平安科技(深圳)有限公司 A kind of method and terminal device of management caching picture
CN109299041A (en) * 2018-07-06 2019-02-01 平安科技(深圳)有限公司 A kind of image cache method for cleaning and terminal device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7050061B1 (en) * 1999-06-09 2006-05-23 3Dlabs Inc., Ltd. Autonomous address translation in graphic subsystem
US6894693B1 (en) * 2001-02-09 2005-05-17 Vicarious Visions Inc. Management of limited resources in a graphics system
CN104599315A (en) * 2014-12-09 2015-05-06 深圳市腾讯计算机系统有限公司 Three-dimensional scene construction method and system
CN106227744A (en) * 2016-07-12 2016-12-14 努比亚技术有限公司 Terminal document managing device, terminal and terminal document management method
CN108959505A (en) * 2018-06-27 2018-12-07 平安科技(深圳)有限公司 A kind of method and terminal device of management caching picture
CN109299041A (en) * 2018-07-06 2019-02-01 平安科技(深圳)有限公司 A kind of image cache method for cleaning and terminal device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CAINIAO_LIU: "《自动纹理管理》", 《HTTPS://BLOG.CSDN.NET/CAINIAO_LIU/ARTICLE/DETAILS/5306806》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112370771A (en) * 2020-10-20 2021-02-19 广州西山居世游网络科技有限公司 Game running memory dynamic adjusting method and system

Similar Documents

Publication Publication Date Title
JP7013466B2 (en) Application data processing methods, equipment, and computer programs
TW202141300A (en) Page processing method, device, apparatus and storage medium
CN105095107B (en) Clear up data cached method and device
CN109815425A (en) Caching data processing method, device, computer equipment and storage medium
CN107463627A (en) A kind of picture loading method and terminal
CN104915461B (en) Page presentation method and device
CN106339061A (en) Mobile terminal and method of run application thereof
CN105550246B (en) The system and method for load networks picture under Android platform
CN103353860B (en) EMS memory management process and device
CN106791953A (en) Many player control methods, server and client
US11748389B1 (en) Delegated decision tree evaluation
CN110020300B (en) Browser page synthesis method and terminal
CN105868420A (en) Network resource loading mode configuration method and device
CN109710328A (en) Page configuration method, apparatus, equipment and readable storage medium storing program for executing
CN112748843B (en) Page switching method and device, computer equipment and storage medium
CN110119490A (en) Web browser method, device, computer equipment and storage medium
CN107133112A (en) A kind of asynchronous process fsync method and mobile terminal
US20120062573A1 (en) Display switching device
CN110400356A (en) Image texture control method, device, equipment and storage medium
CN112836155A (en) Method for increasing opening speed of detailed pages of building
CN110209447B (en) List page data display method and list page data display device
CN103324679A (en) Method and device for controlling data update in cache server
CN109164968A (en) Exchange method and device based on list
CN109672931B (en) Method and apparatus for processing video frames
US20110316877A1 (en) Display area control apparatus, display area control method, and integrated circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination