WO2018020647A1 - 描画データ生成プログラム、描画データ生成装置、及び描画データ生成方法 - Google Patents

描画データ生成プログラム、描画データ生成装置、及び描画データ生成方法 Download PDF

Info

Publication number
WO2018020647A1
WO2018020647A1 PCT/JP2016/072239 JP2016072239W WO2018020647A1 WO 2018020647 A1 WO2018020647 A1 WO 2018020647A1 JP 2016072239 W JP2016072239 W JP 2016072239W WO 2018020647 A1 WO2018020647 A1 WO 2018020647A1
Authority
WO
WIPO (PCT)
Prior art keywords
drawing data
update area
updated
character string
buffer
Prior art date
Application number
PCT/JP2016/072239
Other languages
English (en)
French (fr)
Inventor
長尾勇輝
Original Assignee
富士通株式会社
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 富士通株式会社 filed Critical 富士通株式会社
Priority to JP2018530289A priority Critical patent/JP6699730B2/ja
Priority to PCT/JP2016/072239 priority patent/WO2018020647A1/ja
Publication of WO2018020647A1 publication Critical patent/WO2018020647A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/802D [Two Dimensional] animation, e.g. using sprites

Definitions

  • the present invention relates to a drawing data generation program, a drawing data generation device, and a drawing data generation method.
  • HyperText® Markup® Language HTML
  • HTML browsers are also applied to devices with large screens such as digital signage devices. While the screen size increases, the parts related to the processing speed such as Central Processing Unit (CPU) and memory are not much different from conventional embedded devices. For this reason, the drawing time becomes longer as the screen becomes larger.
  • CPU Central Processing Unit
  • the HTML browser analyzes the HTML content, holds internal information as Document Object Model (DOM) information, and renders the HTML content on the screen according to the DOM information. At this time, the HTML browser draws the updated area as a difference among the areas that can be displayed on the screen, thereby speeding up the drawing process.
  • DOM Document Object Model
  • the rendering time is considered to be long because rendering data of the full screen is generated every time the two rendering buffers are switched.
  • an object of the present invention is to reduce the amount of drawing data to be generated in a drawing process of content having a hierarchical structure.
  • the drawing data generation program causes the computer to execute the following processing.
  • the computer generates drawing data from the display information of the content according to the analysis result of the hierarchical structure of the content.
  • the computer stores the drawing data in the first drawing buffer among the plurality of drawing buffers.
  • the computer specifies a non-update area and an update area in the display information of the content based on the analysis result according to the update of the content.
  • the computer generates updated drawing data from the display information after the update area is updated.
  • the computer stores the drawing data of the non-updated area stored in the first drawing buffer and the updated drawing data in the second drawing buffer among the plurality of drawing buffers.
  • the amount of drawing data to be generated can be reduced in the drawing processing of content having a hierarchical structure.
  • FIG. 1 It is a figure which shows the drawing data stored in two drawing buffers. It is a functional block diagram of a drawing data generation apparatus. It is a flowchart of a drawing data generation process. It is a functional block diagram which shows the specific example of a drawing data generation apparatus. It is a block diagram of an HTML browser. It is a block diagram of DOM information. It is a flowchart of the drawing data generation process at the time of the first display. It is a flowchart of a screen update process. It is a flowchart of the drawing data generation process at the time of update. It is a block diagram of the DOM information showing a partial character string. It is a flowchart of the screen update process using the DOM information showing a partial character string. It is a flowchart of a partial character string drawing process. It is a block diagram of information processing apparatus.
  • the front screen rendering buffer displayed on the display device screen and the back screen rendering buffer not displayed on the screen are displayed. And may be provided.
  • the content to be drawn is drawn in the drawing buffer on the back screen, and the drawing data on the back screen is displayed on the screen by switching between the back screen and the front screen when drawing is completed.
  • the drawing data that has been drawn on the front screen until then will be held on the back screen.
  • FIG. 1 shows an example of drawing data stored in two drawing buffers. Assume that drawing data of a content including a character string and an image is stored in the drawing buffer of the front screen 101, and only the image is updated. In this case, of the areas 111 to 118 included in the back screen 102, the display information of the areas 111 to 117 including the character string is not updated, and only the display information of the area 118 including the image is updated.
  • drawing data representing display information is generated for all of the areas 111 to 118 and stored in the drawing buffer of the back screen 102. Then, by switching between the back screen 102 and the front screen 101, the drawing data of the back screen 102 is displayed on the screen.
  • the drawing process based on the DOM information is performed in the following procedure.
  • the HTML browser calculates the width and height of the character string included in the DOM information. At this time, the HTML browser divides the character string to be drawn into a plurality of partial character strings so as to fit in the designated drawing area, obtains the width of each partial character string, and the partial character string becomes the drawing area. It is determined whether it fits in. Then, the HTML browser repeats the division of the partial character string until all the partial character strings fit in the drawing area.
  • the HTML browser generates character string drawing data.
  • the HTML browser stores the generated drawing data in the drawing buffer on the back screen.
  • the processing of (a) and (b) takes a lot of processing time, but if the display information of the character string is not updated, the drawing data of (b) does not change. Therefore, the drawing data is cached when the drawing processing is completed, and the processing of (a) and (b) is not performed in response to the redrawing request, but only the processing of storing the previous drawing data in the drawing buffer of the back screen. A way to do this is conceivable. As a result, it is possible to reduce the amount of drawing data to be generated and shorten the processing time.
  • FIG. 2 shows an example of a functional configuration of the drawing data generation apparatus according to the embodiment.
  • the drawing data generation apparatus 201 in FIG. 2 includes N drawing buffers, that is, a drawing buffer 211-1 to a drawing buffer 211 -N, and a generation unit 212.
  • FIG. 3 is a flowchart showing an example of drawing data generation processing performed by the drawing data generation apparatus 201 of FIG.
  • the generation unit 212 generates drawing data from content display information according to the analysis result of the hierarchical structure of the content (step 301). Then, the generation unit 212 stores the generated drawing data in the first drawing buffer among the drawing buffers 211-1 to 211-N (step 302).
  • the generation unit 212 specifies a non-update area and an update area in the display information of the content based on the analysis result according to the update of the content (step 303), and updates from the display information after the update area is updated.
  • Drawing data is generated (step 304).
  • the generation unit 212 stores the drawing data of the non-update area stored in the first drawing buffer and the generated updated drawing data in the second drawing buffer among the drawing buffers 211-1 to 211 -N. (Step 305).
  • the amount of drawing data to be generated can be reduced in the drawing processing of content having a hierarchical structure.
  • FIG. 4 shows a specific example of the drawing data generation apparatus 201 of FIG.
  • the drawing data generation apparatus 201 in FIG. 4 includes a drawing buffer 211-1, a drawing buffer 211-2, a communication unit 401, a processing unit 402, a display unit 403, and a storage unit 404.
  • the storage unit 404 stores an HTML browser 411, HTML content 412 having a hierarchical structure, and DOM information 413.
  • the processing unit 402 corresponds to the generation unit 212 in FIG. 2 and requests the HTML content 412 from an external server via the communication network by executing the HTML browser 411.
  • the communication unit 401 receives the HTML content 412 from an external server via the communication network, and stores the received HTML content 412 in the storage unit 404.
  • the processing unit 402 generates DOM information 413 including a plurality of elements from the HTML content 412 by executing the HTML browser 411. Next, the processing unit 402 generates drawing data for each element included in the DOM information 413, and stores the generated drawing data in the drawing buffer on the back screen of the drawing buffer 211-1 and the drawing buffer 211-2. .
  • the processing unit 402 displays the generated drawing data on the screen of the display unit 403 by switching the drawing buffer of the back screen and the drawing buffer of the front screen.
  • the drawing buffer on the front screen that has stored the drawing data being displayed on the screen is changed to the drawing buffer on the back screen, and the next drawing data can be stored.
  • FIG. 5 shows a configuration example of the HTML browser 411 of FIG.
  • the HTML browser 411 in FIG. 5 includes a parser 501, a DOM management unit 502, a rasterizer 503, and a script engine 504.
  • the parser 501 analyzes the HTML content 412, converts the HTML content 412 into DOM information 413, and stores the DOM information 413 in the storage unit 404.
  • the DOM management unit 502 converts the DOM information 413 into raster-format image data using the rasterizer 503, and visualizes the DOM information 413.
  • the script engine 504 outputs an update request for updating display information of elements included in the DOM information 413 by interpreting and executing a script described in an object-oriented script language, for example.
  • the DOM management unit 502 updates the state of the target element included in the DOM information 413 in response to the update request output from the script engine 504, and uses the rasterizer 503 when the display information of the target element is changed. Visualize the DOM information 413 again.
  • the script engine 504 may be a JavaScript (registered trademark) engine.
  • FIG. 6 shows a configuration example of the DOM information 413 in FIG.
  • HTMLElement 601 is a class common to each element, and all elements including HTMLLivElement 602, HTMLSpanElement 603, and the like are implemented by inheriting HTMLElement 601.
  • a common attribute can be added to all elements of the DOM information 413 by adding an attribute used in the drawing data generation process to the HTML element 601. For example, the following attributes are added.
  • the processing unit 402 can determine whether or not the element has been updated by referring to isContentModified of each element, and can determine whether or not the element is a drawing target by referring to isVisible. be able to.
  • isVisible of an element that is not displayed on the screen is set to false.
  • isVisible of an element designated not to be displayed on the screen by HTML content 412, script, Cascading Style Style Sheets (CSS), Scalable Vector Style Graphics (SVG), or the like is also set to false. Examples of the latter include a case where visibility is dynamically rewritten by a script, a case where display: none is specified by CSS, and the like.
  • the processing unit 402 When the processing unit 402 generates drawing data of an element to be drawn, the processing unit 402 stores the generated drawing data as a cached Content of the element.
  • FIG. 7 is a flowchart illustrating an example of a drawing data generation process performed by the processing unit 402 of FIG. 4 when the HTML content 412 is displayed for the first time.
  • the processing unit 402 executes the HTML browser 411 to perform the drawing data generation process of FIG. 7 using the function of the DOM management unit 502.
  • the processing unit 402 analyzes the HTML content 412 (step 701) and generates DOM information 413 (step 702). At this time, the processing unit 402 sets true or false to isVisible of each element included in the DOM information 413 and sets true to isContentModified of each element according to the description of the HTML content 412. Then, the processing unit 402 performs screen update processing (step 703).
  • FIG. 8 is a flowchart showing an example of the screen update process in step 703 of FIG.
  • the processing unit 402 selects one element included in the DOM information 413 (step 801), and checks the isVisible of the selected element (step 802). When isVisible is true (step 802, YES), the processing unit 402 checks isContentModified of the selected element (step 803).
  • the processing unit 402 If isContentModified is true (step 803, YES), the processing unit 402 generates drawing data from the display information of the selected element (step 804). For example, when the selected element is a character string, the processing unit 402 performs the processes (a) and (b) described above. Then, the processing unit 402 stores the generated drawing data in the cached Content of the selected element (step 805).
  • the processing unit 402 draws the selected element on the back screen by storing the generated drawing data in the back screen drawing buffer (step 806), and changes the isContentModified of the element from true to false (step 806). Step 807). Then, the processing unit 402 checks whether or not all elements included in the DOM information 413 have been selected (step 808).
  • step 808 NO When an unselected element remains (step 808, NO), the processing unit 402 repeats the processing after step 801 for the next element. When isable is false (step 802, NO), the processing unit 402 repeats the processing after step 801 for the next element.
  • step 803, NO the processing unit 402 skips drawing data generation and performs the processing from step 806 onward. In this case, instead of the generated drawing data, the drawing data stored in the cached Content is stored in the drawing buffer on the back screen. However, in the drawing data generation process of FIG. 7, since true is set in isContentModified for all elements, drawing data generation is not skipped.
  • step 808 If all the elements are selected (step 808, YES), the processing unit 402 replaces the drawing buffer on the back screen with the drawing buffer on the front screen, so that the HTML content 412 drawn on the back screen is displayed on the screen. It is displayed (step 809).
  • FIG. 9 is a flowchart illustrating an example of a drawing data generation process performed by the processing unit 402 when the HTML content 412 is updated.
  • the processing unit 402 executes the HTML browser 411 to perform the drawing data generation process of FIG. 9 using the function of the DOM management unit 502.
  • the HTML content 412 is updated in the following cases, for example, and the display coordinates, display information, etc. of any element change.
  • (B1) DOM operation by script (b2) Update by CSS animation or SVG animation (b3) Update by user operation
  • the processing unit 402 updates the state of the target element to be updated in accordance with the description of the HTML content 412 (step 901). Then, the isVisible of the target element is checked (step 902). If isVisible is true (step 902, YES), the processing unit 402 checks whether the display information of the target element has been changed (step 903).
  • the processing unit 402 changes the isContentModified of the target element from false to true (step 904), and performs the screen update process of FIG. 8 (step 905). ).
  • drawing data of the target element is generated in step 804, and drawing data of the target element is stored in the cached Content in step 805.
  • the target element is drawn on the back screen.
  • step 806 elements other than the target element are drawn on the back screen using the drawing data stored in the cachedContent.
  • step 902 If isVisible is false (step 902, NO), or if the display information of the target element has not been changed (step 903, NO), the processing unit 402 ends the process without performing the screen update process.
  • the drawing data of the element corresponding to the non-updated area By skipping generation, the amount of drawing data to be generated is reduced. As a result, the processing time of the drawing data generation process can be reduced.
  • content including advertisement banners using animation, content of video sites, etc. display information is updated almost like elements such as text or still images, and elements that display information is updated frequently, such as animation or video. Often consists of elements that are not.
  • display information is updated almost like elements such as text or still images, and elements that display information is updated frequently, such as animation or video. Often consists of elements that are not.
  • by reducing the processing time for redrawing text or still images it is possible to suppress a decrease in the frame rate of animation or moving images.
  • attributes used in the drawing data generation process are added for each element, but it is also possible to add attributes for each drawing unit included in each element. For example, since a character string included in an element may be divided into a plurality of partial character strings, the drawing data generation processing time can be further reduced by caching the drawing data for each partial character string. it can.
  • FIG. 10 shows a configuration example of the DOM information 413 in which attributes are added for each partial character string included in each element. All elements including HTMLLivElement 602, HTMLSpanElement 603, etc. can use TextRun1001, and TextRun1001 can use RenderedString 1002.
  • TextRun 1001 is an object representing a character string, and has string [].
  • a plurality of RenderedStrings 1002 representing the respective partial character strings are set in string [].
  • one RenderedString 1002 representing the character string is set in string [].
  • RenderedString 1002 is an object that represents a character string or a partial character string, and has the following attributes, for example.
  • C1 cachedString cached drawing data
  • c2 isStringModified flag indicating whether a character string or a partial character string has been updated
  • c3 isVisible indicates whether a character string or a partial character string is displayed
  • Flag string: Display information indicating a character string or a partial character string
  • isVisible when isVisible is true, it indicates that a character string or a partial character string is displayed, and when isVisible is false, it indicates that a character string or a partial character string is not displayed. Since the character string or the partial character string is displayed on the screen, the isVisible of RenderedString 1002 is set to true.
  • FIG. 11 is a flowchart illustrating an example of the screen update process performed in step 703 in FIG. 7 or step 905 in FIG. 9 when the DOM information 413 in FIG. 10 is used.
  • the processing unit 402 selects one element included in the DOM information 413 (step 1101), and calculates the width and height of the character string represented by the selected element (step 1102). Then, the processing unit 402 determines whether to divide the character string based on the calculated width and height (step 1103).
  • the processing unit 402 determines that the character string is not divided when the calculated width and height fit within the specified drawing area, and determines that the character string is divided when the width or height does not fit within the drawing area. can do.
  • the processing unit 402 When dividing the character string (step 1103, YES), the processing unit 402 divides the character string into a plurality of partial character strings having a width and a height that can fit in the drawing area (step 1104). Then, the processing unit 402 selects one partial character string as a drawing target (step 1105), and performs a partial character string drawing process on the selected partial character string (step 1106). Thereby, the drawing data of the selected partial character string is stored in the drawing buffer of the back screen.
  • the processing unit 402 checks whether or not all partial character strings have been selected (step 1107). If an unselected partial character string remains (step 1107, NO), the processing unit 402 repeats the processing from step 1105 on for the next partial character string.
  • the processing unit 402 checks whether or not all elements included in the DOM information 413 have been selected (step 1108). When an unselected element remains (step 1108, NO), the processing unit 402 repeats the processing after step 1101 for the next element.
  • the processing unit 402 performs a character string drawing process for the character string (step 1110). Thereby, the drawing data of the character string is stored in the drawing buffer of the back screen. And the process part 402 performs the process after step 1108.
  • the processing unit 402 displays the HTML content 412 drawn on the back screen on the screen by switching the drawing buffer on the back screen and the drawing buffer on the front screen. (Step 1109).
  • FIG. 12 is a flowchart showing an example of the partial character string drawing process in step 1106 of FIG.
  • the processing unit 402 checks whether or not there is a RenderedString 1002 representing a partial character string with reference to string [] of the TextRun 1001 (Step 1201).
  • the rendered string 1002 does not exist yet, and when the HTML content 412 is updated, the rendered string 1002 exists.
  • Step 1201, NO When there is no RenderedString 1002 (Step 1201, NO), the processing unit 402 generates a RenderedString 1002 representing a partial character string, and sets true to its isVisible (Step 1210).
  • the processing unit 402 generates drawing data from the display information of the partial character string (Step 1203), and stores the generated drawing data in the cachedString of the RenderedString 1002 (Step 1204).
  • the processing unit 402 stores the partial character string in the string of RenderedString 1002 (Step 1205), and sets true to isStringModified (Step 1206).
  • the processing unit 402 sets RenderedString 1002 to string [] of TextRun 1001 (Step 1207). Then, the processing unit 402 draws the partial character string on the back screen by storing the generated drawing data in the drawing buffer of the back screen (step 1208).
  • the processing unit 402 checks whether the partial character string to be rendered is the same as the partial character string represented by the string of the rendered string 1002 (step 1202). When the partial character string is not updated, the drawing target partial character string is the same as the partial character string represented by string. When the partial character string is updated, the drawing target partial character string is the partial character represented by string. It is different from the column.
  • step 1202, NO If the partial character string to be drawn is different from the partial character string represented by string (step 1202, NO), the processing unit 402 performs the processing from step 1203 onward.
  • the processing unit 402 skips drawing data generation. Then, the processing unit 402 changes isStringModified of RenderedString 1002 from true to false (step 1209), and performs the process of step 1208. In this case, instead of the generated drawing data, the drawing data stored in the cachedString is stored in the drawing buffer on the back screen.
  • step 1110 of FIG. 11 the process of replacing the partial character string with the character string in the flowchart of FIG. 12 is performed.
  • the drawing to be generated is generated by skipping the drawing data generation of the partial character string corresponding to the non-update area.
  • the amount of data is further reduced. Thereby, the processing time of the drawing data generation process can be further reduced.
  • the configuration of the drawing data generation device 201 in FIGS. 2 and 4 is merely an example, and some components may be omitted or changed according to the use or conditions of the drawing data generation device 201.
  • the display unit 403 in FIG. 4 can be omitted.
  • the drawing data generation apparatus 201 in FIG. 4 may include three or more drawing buffers.
  • FIGS. 3, 7 to 9, 11, and 12 are merely examples, and some processes may be omitted or changed according to the configuration or conditions of the drawing data generation apparatus 201.
  • the processing of Step 701 and Step 702 of FIG. 7 can be omitted, and when drawing data is displayed by the external device, the step of FIG.
  • the processing of 809 and step 1109 of FIG. 11 can be omitted.
  • the drawing data changes according to the content to be drawn.
  • the content to be rendered is not limited to the HTML content 412, and may be another content having a hierarchical structure such as content described in eXtensible Markup Language (XML).
  • XML eXtensible Markup Language
  • the configuration of the HTML browser 411 in FIG. 5 is merely an example, and some components may be omitted or changed.
  • the DOM information 413 in FIGS. 6 and 10 is merely an example, and some attributes may be omitted or changed.
  • FIG. 13 shows a configuration example of an information processing apparatus (computer) used as the drawing data generation apparatus 201 in FIGS. 2 and 4.
  • 13 includes a CPU 1301 (processor), a memory 1302, an input device 1303, an auxiliary storage device 1304, a medium driving device 1305, a network connection device 1306, a Graphics1Processing Unit (GPU) 1307, and a display device 1308.
  • the information processing apparatus further includes a drawing buffer 211-1 and a drawing buffer 211-2.
  • the CPU 1301, the memory 1302, the input device 1303, the auxiliary storage device 1304, the medium drive device 1305, the network connection device 1306, and the GPU 1307 are connected to each other via a bus 1309.
  • the drawing buffer 211-1, the drawing buffer 211-2, and the display device 1308 are connected to the GPU 1307.
  • the memory 1302 is a semiconductor memory such as a Read Only Memory (ROM), a Random Access Memory (RAM), or a flash memory, and stores programs and data used for drawing data generation processing.
  • the memory 1302 can be used as the storage unit 404 in FIG.
  • the CPU 1301 operates as the generation unit 212 in FIG. 2 and the processing unit 402 in FIG. 4 by executing a program using the memory 1302, for example.
  • the input device 1303 is, for example, a keyboard, a pointing device, or the like, and is used for inputting an instruction or information from an operator or a user.
  • the auxiliary storage device 1304 is, for example, a magnetic disk device, an optical disk device, a magneto-optical disk device, a tape device, or the like.
  • the auxiliary storage device 1304 may be a hard disk drive.
  • the information processing apparatus can store programs and data in the auxiliary storage device 1304 and load them into the memory 1302 for use.
  • the auxiliary storage device 1304 can be used as the storage unit 404 in FIG.
  • the medium driving device 1305 drives the portable recording medium 1310 and accesses the recorded contents.
  • the portable recording medium 1310 is a memory device, a flexible disk, an optical disk, a magneto-optical disk, or the like.
  • the portable recording medium 1310 may be a Compact Disk Read Only Memory (CD-ROM), Digital Versatile Disk (DVD), Universal Serial Bus (USB) memory, or the like.
  • An operator or user can store programs and data in the portable recording medium 1310 and load them into the memory 1302 for use.
  • the computer-readable recording medium for storing the program and data used for the drawing data generation process is a physical (non-temporary) such as the memory 1302, the auxiliary storage device 1304, or the portable recording medium 1310. It is a recording medium.
  • the network connection device 1306 is connected to a communication network such as Local Area Network or Wide Area Network, and is a communication interface that performs data conversion accompanying communication.
  • the information processing apparatus can receive a program and data from an external apparatus via the network connection apparatus 1306, and can use them by loading them into the memory 1302.
  • the network connection device 1306 can be used as the communication unit 401 in FIG.
  • the display device 1308 displays an inquiry or instruction to the operator or user and a processing result on the screen.
  • the processing result may be rendering data of the HTML content 412.
  • the display device 1308 can be used as the display unit 403 in FIG.
  • the GPU 1307 performs processing for storing the drawing data in the drawing buffer on the back screen in accordance with an instruction from the CPU 1301.
  • the GPU 1307 also performs processing for displaying the HTML content 412 drawn on the back screen on the screen of the display device 1308 by switching the drawing buffer on the back screen and the drawing buffer on the front screen in accordance with an instruction from the CPU 1301.
  • the information processing apparatus does not have to include all the components shown in FIG. 13, and some of the components can be omitted depending on the application or conditions.
  • the medium driving device 1305 may be omitted.
  • the information processing apparatus may include three or more drawing buffers.
  • the CPU 1301 can emulate the operation of the GPU 1307 instead of the GPU 1307 performing the drawing process.
  • the GPU 1307, the drawing buffer 211-1, and the drawing buffer 211-2 are omitted, and two drawing buffers are provided in the memory 1302.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Processing Or Creating Images (AREA)

Abstract

コンピュータは、コンテンツの階層化構造の解析結果に応じて、コンテンツの表示情報から描画データを生成し(ステップ301)、描画データを複数の描画バッファのうち第1描画バッファに格納する(ステップ302)。次に、コンピュータは、コンテンツの更新に応じて、解析結果に基づき、コンテンツの表示情報のうち非更新領域と更新領域とを特定し(ステップ303)、更新領域の更新後の表示情報から更新描画データを生成する(ステップ304)。そして、コンピュータは、第1描画バッファに格納した非更新領域の描画データと、更新描画データとを、複数の描画バッファのうち第2描画バッファに格納する(ステップ305)。

Description

描画データ生成プログラム、描画データ生成装置、及び描画データ生成方法
 本発明は、描画データ生成プログラム、描画データ生成装置、及び描画データ生成方法に関する。
 近年、HyperText Markup Language(HTML)ブラウザの適用範囲は、パーソナルコンピュータ及びスマートフォンにとどまらず、デジタルサイネージ装置等の大きな画面を持つ装置に対してもHTMLブラウザが適用されるようになっている。画面サイズが大きくなる一方で、Central Processing Unit(CPU)、メモリ等の処理速度に関わる部品は、従来の組込み機器と大差はない。このため、画面が大きくなるほど描画時間は長くなる。
 HTMLブラウザは、HTMLコンテンツを解析して、内部情報をDocument Object Model(DOM)情報として保持した上で、そのDOM情報に従ってHTMLコンテンツを画面上に描画する。このとき、HTMLブラウザは、画面に表示可能な領域のうち、更新された領域を差分として描画することで、描画処理の高速化を図っている。
 最近では、組込み機器において描画処理をソフトウェアで実行するのではなく、OpenGL/ES2.0等のApplication Program Interface(API)に対応するハードウェアによって実行することが可能になっている。このようなハードウェアを活用することで、描画処理の高速化を図ることができる。
 ページデータの更新時に更新後のデータを外部装置からキャッシュ内に直接書き込む方法、及びダウンロードしてある先読みページが選択された場合に、その先読みページのデータを表示させる方法も知られている(例えば、特許文献1及び特許文献2を参照)。
特開2001-356957号公報 特開2002-014798号公報
 ハードウェアによるHTMLコンテンツの描画処理では、2つの描画バッファを切り替える度に全画面の描画データが生成されるため、処理時間が長くなると考えられる。
 なお、かかる問題は、HTMLコンテンツの描画処理に限らず、階層化構造を有する他のコンテンツの描画処理においても生ずるものである。また、かかる問題は、2つの描画バッファを切り替える描画処理に限らず、3つ以上の描画バッファを切り替える描画処理においても生ずるものである。
 1つの側面において、本発明は、階層化構造を有するコンテンツの描画処理において、生成する描画データのデータ量を削減することを目的とする。
 1つの案では、描画データ生成プログラムは、以下の処理をコンピュータに実行させる。
(1)コンピュータは、コンテンツの階層化構造の解析結果に応じて、コンテンツの表示情報から描画データを生成する。
(2)コンピュータは、描画データを複数の描画バッファのうち第1描画バッファに格納する。
(3)コンピュータは、コンテンツの更新に応じて、解析結果に基づき、コンテンツの表示情報のうち非更新領域と更新領域とを特定する。
(4)コンピュータは、更新領域の更新後の表示情報から更新描画データを生成する。
(5)コンピュータは、第1描画バッファに格納した非更新領域の描画データと、更新描画データとを、複数の描画バッファのうち第2描画バッファに格納する。
 実施形態によれば、階層化構造を有するコンテンツの描画処理において、生成する描画データのデータ量を削減することができる。
2つの描画バッファに格納される描画データを示す図である。 描画データ生成装置の機能的構成図である。 描画データ生成処理のフローチャートである。 描画データ生成装置の具体例を示す機能的構成図である。 HTMLブラウザの構成図である。 DOM情報の構成図である。 初回表示時の描画データ生成処理のフローチャートである。 画面更新処理のフローチャートである。 更新時の描画データ生成処理のフローチャートである。 部分文字列を表すDOM情報の構成図である。 部分文字列を表すDOM情報を用いた画面更新処理のフローチャートである。 部分文字列描画処理のフローチャートである。 情報処理装置の構成図である。
 以下、図面を参照しながら、実施形態を詳細に説明する。
 上述したハードウェアによる描画処理では、ハードウェアの構成にも依存するが、例えば、表示装置の画面上に表示されている表画面の描画バッファと、画面上に表示されていない裏画面の描画バッファとが設けられることがある。そして、描画対象のコンテンツは裏画面の描画バッファに描画され、描画完了時点で裏画面と表画面とを切り替えることで、裏画面の描画データが画面上に表示される。このとき、ハードウェアの仕様に依存するが、それまで表画面に描画されていた描画データが裏画面に保持される保証はない。
 このように、描画バッファの切り替え後に切り替え前の描画データが保持されない環境においては、ソフトウェアによるダブルバッファリングと同様にして更新部分の部分描画を行うと、非更新部分はまったく描画されず、更新部分のみが表示されてしまう。
 したがって、ハードウェアによる描画処理では、HTMLブラウザの画面の一部分を差分で描画することは困難であり、表画面と裏画面とを切り替える度に画面全体の描画データが生成されることになる。この場合、ハードウェアによる描画処理の利点が必ずしも生かせるとは限らず、得られる効果は限定的である。
 図1は、2つの描画バッファに格納される描画データの例を示している。表画面101の描画バッファに文字列及び画像を含むコンテンツの描画データが格納されており、そのうち画像のみが更新された場合を想定する。この場合、裏画面102に含まれる領域111~領域118のうち、文字列を含む領域111~領域117の表示情報は更新されず、画像を含む領域118の表示情報のみが更新される。
 しかし、表示情報が更新されたか否かにかかわらず、領域111~領域118のすべてに対して表示情報を表す描画データが生成され、裏画面102の描画バッファに格納される。そして、裏画面102と表画面101とを切り替えることで、裏画面102の描画データが画面上に表示される。
 例えば、描画対象のコンテンツが文字列である場合、DOM情報に基づく描画処理は、以下のような手順で行われる。
(a)HTMLブラウザは、DOM情報に含まれる文字列の幅及び高さを計算する。このとき、HTMLブラウザは、描画対象の文字列を、指定された描画領域に収まるように複数の部分文字列に分割し、各部分文字列の幅を取得して、その部分文字列が描画領域に収まるか否かを判定する。そして、HTMLブラウザは、すべての部分文字列が描画領域に収まるまで、部分文字列の分割を繰り返す。
(b)HTMLブラウザは、文字列の描画データを生成する。
(c)HTMLブラウザは、生成した描画データを裏画面の描画バッファに格納する。
 このうち、(a)及び(b)の処理に多くの処理時間がかかるが、文字列の表示情報が更新されなければ、(b)の描画データは変化しない。そこで、描画処理の完了時に描画データをキャッシュしておき、再描画要求に対しては(a)及び(b)の処理を行わず、前回の描画データを裏画面の描画バッファに格納する処理のみを行う方法が考えられる。これにより、生成する描画データのデータ量を削減して、処理時間を短縮することが可能になる。
 図2は、実施形態の描画データ生成装置の機能的構成例を示している。図2の描画データ生成装置201は、描画バッファ211-1~描画バッファ211-NのN個の描画バッファと、生成部212とを含む。
 図3は、図2の描画データ生成装置201が行う描画データ生成処理の例を示すフローチャートである。まず、生成部212は、コンテンツの階層化構造の解析結果に応じて、コンテンツの表示情報から描画データを生成する(ステップ301)。そして、生成部212は、生成した描画データを、描画バッファ211-1~描画バッファ211-Nのうち第1描画バッファに格納する(ステップ302)。
 次に、生成部212は、コンテンツの更新に応じて、解析結果に基づき、コンテンツの表示情報のうち非更新領域及び更新領域を特定し(ステップ303)、更新領域の更新後の表示情報から更新描画データを生成する(ステップ304)。そして、生成部212は、第1描画バッファに格納した非更新領域の描画データと、生成した更新描画データとを、描画バッファ211-1~描画バッファ211-Nのうち第2描画バッファに格納する(ステップ305)。
 このような描画データ生成装置201によれば、階層化構造を有するコンテンツの描画処理において、生成する描画データのデータ量を削減することができる。
 図4は、図2の描画データ生成装置201の具体例を示している。図4の描画データ生成装置201は、描画バッファ211-1、描画バッファ211-2、通信部401、処理部402、表示部403、及び記憶部404を含む。記憶部404は、HTMLブラウザ411、階層化構造を有するHTMLコンテンツ412、及びDOM情報413を記憶する。
 処理部402は、図2の生成部212に対応し、HTMLブラウザ411を実行することで、通信ネットワークを介して外部のサーバにHTMLコンテンツ412を要求する。通信部401は、通信ネットワークを介して外部のサーバからHTMLコンテンツ412を受信し、受信したHTMLコンテンツ412を記憶部404に格納する。
 処理部402は、HTMLブラウザ411を実行することで、HTMLコンテンツ412から、複数の要素を含むDOM情報413を生成する。次に、処理部402は、DOM情報413に含まれる各要素の描画データを生成し、生成した描画データを、描画バッファ211-1及び描画バッファ211-2のうち裏画面の描画バッファに格納する。
 そして、処理部402は、裏画面の描画バッファと表画面の描画バッファとを入れ替えることで、生成した描画データを表示部403の画面上に表示する。これにより、画面に表示中の描画データを格納していた表画面の描画バッファが裏画面の描画バッファに変更され、次の描画データを格納できる状態になる。
 図5は、図4のHTMLブラウザ411の構成例を示している。図5のHTMLブラウザ411は、パーサ501、DOM管理部502、ラスタライザ503、及びスクリプトエンジン504を含む。パーサ501は、HTMLコンテンツ412を解析することで、HTMLコンテンツ412をDOM情報413に変換し、DOM情報413を記憶部404に格納する。DOM管理部502は、ラスタライザ503を用いてDOM情報413をラスタ形式の画像データに変換し、DOM情報413を視覚化する。
 スクリプトエンジン504は、例えば、オブジェクト指向のスクリプト言語で記述されたスクリプトを解釈して実行することで、DOM情報413に含まれる要素の表示情報を更新する更新要求を出力する。DOM管理部502は、スクリプトエンジン504から出力される更新要求に応じて、DOM情報413に含まれる対象要素の状態を更新し、対象要素の表示情報が変更される場合は、ラスタライザ503を用いてDOM情報413を再度視覚化する。スクリプトエンジン504は、JavaScript(登録商標)エンジンであってもよい。
 図6は、図4のDOM情報413の構成例を示している。HTMLElement601は、各要素に共通なクラスであり、HTMLDivElement602、HTMLSpanElement603等を含むすべての要素は、HTMLElement601を継承して実装される。
 そこで、このHTMLElement601に対して、描画データ生成処理で用いられる属性を追加することで、DOM情報413のすべての要素に対して共通の属性を追加することができる。例えば、以下のような属性が追加される。
(a1)cachedContent:キャッシュされた描画データ
(a2)isContentModified:要素が更新されたか否かを示すフラグ
(a3)isVisible:要素が表示されているか否かを示すフラグ
 isContentModifiedがtrueのとき、要素が更新されたことを示し、isContentModifiedがfalseのとき、要素が更新されていないことを示す。したがって、isContentModifiedがtrueである要素は、更新領域に対応し、isContentModifiedがfalseである要素は、非更新領域に対応する。
 また、isVisibleがtrueのとき、要素が表示されていることを示し、isVisibleがfalseのとき、要素が表示されていないことを示す。
 処理部402は、各要素のisContentModifiedを参照することで、その要素が更新されたか否かを判定することができ、isVisibleを参照することで、その要素が描画対象であるか否かを判定することができる。
 例えば、<br>等のように、画面上に表示されない要素のisVisibleは、falseに設定される。さらに、HTMLコンテンツ412、スクリプト、Cascading Style Sheets(CSS)、Scalable Vector Graphics(SVG)等によって、画面上に表示しないように指定された要素のisVisibleも、falseに設定される。後者の例は、スクリプトによってvisibilityが動的に書き換えられた場合、CSSによってdisplay:noneが指定された場合等である。
 処理部402は、描画対象の要素の描画データを生成した場合、生成した描画データをその要素のcachedContentとして格納する。
 図7は、図4の処理部402がHTMLコンテンツ412の初回表示時に行う描画データ生成処理の例を示すフローチャートである。処理部402は、HTMLブラウザ411を実行することで、DOM管理部502の機能を用いて図7の描画データ生成処理を行う。
 まず、処理部402は、HTMLコンテンツ412を解析して(ステップ701)、DOM情報413を生成する(ステップ702)。このとき、処理部402は、HTMLコンテンツ412の記述に従って、DOM情報413に含まれる各要素のisVisibleにtrue又はfalseを設定し、各要素のisContentModifiedにtrueを設定する。そして、処理部402は、画面更新処理を行う(ステップ703)。
 図8は、図7のステップ703における画面更新処理の例を示すフローチャートである。まず、処理部402は、DOM情報413に含まれる1つの要素を選択し(ステップ801)、選択した要素のisVisibleをチェックする(ステップ802)。isVisibleがtrueである場合(ステップ802,YES)、処理部402は、選択した要素のisContentModifiedをチェックする(ステップ803)。
 isContentModifiedがtrueである場合(ステップ803,YES)、処理部402は、選択した要素の表示情報から描画データを生成する(ステップ804)。例えば、選択した要素が文字列である場合、処理部402は、上述した(a)及び(b)の処理を行う。そして、処理部402は、生成した描画データを、選択した要素のcachedContentに格納する(ステップ805)。
 次に、処理部402は、生成した描画データを裏画面の描画バッファに格納することで、選択した要素を裏画面に描画し(ステップ806)、その要素のisContentModifiedをtrueからfalseへ変更する(ステップ807)。そして、処理部402は、DOM情報413に含まれるすべての要素を選択したか否かをチェックする(ステップ808)。
 未選択の要素が残っている場合(ステップ808,NO)、処理部402は、次の要素についてステップ801以降の処理を繰り返す。isibleがfalseである場合(ステップ802,NO)、処理部402は、次の要素についてステップ801以降の処理を繰り返す。
 isContentModifiedがfalseである場合(ステップ803,NO)、処理部402は、描画データ生成をスキップして、ステップ806以降の処理を行う。この場合、生成した描画データの代わりに、cachedContentに格納されている描画データが裏画面の描画バッファに格納される。ただし、図7の描画データ生成処理では、すべての要素のisContentModifiedにtrueが設定されているため、描画データ生成がスキップされることはない。
 そして、すべての要素を選択した場合(ステップ808,YES)、処理部402は、裏画面の描画バッファと表画面の描画バッファとを入れ替えることで、裏画面に描画したHTMLコンテンツ412を画面上に表示する(ステップ809)。
 図9は、処理部402がHTMLコンテンツ412の更新時に行う描画データ生成処理の例を示すフローチャートである。処理部402は、HTMLブラウザ411を実行することで、DOM管理部502の機能を用いて図9の描画データ生成処理を行う。HTMLコンテンツ412の更新は、例えば、以下のような場合に発生し、いずれかの要素の表示座標、表示情報等が変化する。
(b1)スクリプトによるDOM操作
(b2)CSSアニメーション又はSVGアニメーションによる更新
(b3)ユーザ操作による更新
 このうち、(b3)のユーザ操作による更新としては、例えば、テキストボックスの選択によってカーソルの表示を行う場合、スクロールバーを用いてHTMLコンテンツ412をスクロールする場合等が考えられる。
 まず、処理部402は、HTMLコンテンツ412の更新に応じて、HTMLコンテンツ412の記述に従って、更新対象となる対象要素の状態を更新する(ステップ901)。そして、対象要素のisVisibleをチェックする(ステップ902)。isVisibleがtrueである場合(ステップ902,YES)、処理部402は、対象要素の表示情報が変更されたか否かをチェックする(ステップ903)。
 対象要素の表示情報が変更された場合(ステップ903,YES)、処理部402は、対象要素のisContentModifiedをfalseからtrueへ変更して(ステップ904)、図8の画面更新処理を行う(ステップ905)。
 この場合、対象要素のisContentModifiedにはtrueが設定されているため、ステップ804において、対象要素の描画データが生成され、ステップ805において、対象要素の描画データがcachedContentに格納される。そして、ステップ806において、対象要素が裏画面に描画される。
 一方、対象要素以外の要素のisContentModifiedにはfalseが設定されているため、その要素の描画データ生成はスキップされる。そして、ステップ806において、cachedContentに格納されている描画データを用いて、対象要素以外の要素が裏画面に描画される。
 isVisibleがfalseである場合(ステップ902,NO)、又は対象要素の表示情報が変更されていない場合(ステップ903,NO)、処理部402は、画面更新処理を行うことなく、処理を終了する。
 図8の画面更新処理によれば、更新部分の部分描画が困難な環境において、DOM情報413に含まれるすべての要素を再描画する場合であっても、非更新領域に対応する要素の描画データ生成をスキップすることで、生成する描画データのデータ量が削減される。これにより、描画データ生成処理の処理時間を削減することができる。
 特に、アニメーションを使用した広告バナーを含むコンテンツ、動画サイトのコンテンツ等は、アニメーション又は動画のように、頻繁に表示情報が更新される要素と、テキスト又は静止画のように、ほとんど表示情報が更新されない要素とからなることが多い。このようなコンテンツの場合、テキスト又は静止画を再描画するための処理時間を削減することで、アニメーション又は動画のフレームレートの低下等を抑止することが可能になる。
 さらに、図8の画面更新処理は、更新部分の部分描画が可能な環境においても適用することができるため、部分描画が困難であるか否かにかかわらず、処理時間を削減することができる。
 図6のDOM情報413では、描画データ生成処理で用いられる属性が要素毎に追加されているが、各要素に含まれる描画単位毎に属性を追加することも可能である。例えば、要素に含まれる文字列は、複数の部分文字列に分割されることがあるため、部分文字列毎に描画データをキャッシュすることにより、描画データ生成処理の処理時間をさらに削減することができる。
 図10は、各要素に含まれる部分文字列毎に属性を追加したDOM情報413の構成例を示している。HTMLDivElement602、HTMLSpanElement603等を含むすべての要素は、TextRun1001を使用することができ、TextRun1001は、RenderedString1002を使用することができる。
 TextRun1001は、文字列を表すオブジェクトであり、string[]を有する。文字列が複数の部分文字列に分割されている場合、string[]には、それぞれの部分文字列を表す複数のRenderedString1002が設定される。一方、文字列が分割されていない場合、string[]には、その文字列を表す1つのRenderedString1002が設定される。
 RenderedString1002は、文字列又は部分文字列を表すオブジェクトであり、例えば、以下のような属性を有する。
(c1)cachedString:キャッシュされた描画データ
(c2)isStringModified:文字列又は部分文字列が更新されたか否かを示すフラグ
(c3)isVisible:文字列又は部分文字列が表示されているか否かを示すフラグ
(c4)string:文字列又は部分文字列を表す表示情報
 isStringModifiedがtrueのとき、文字列又は部分文字列が更新されたことを示し、isStringModifiedがfalseのとき、文字列又は部分文字列が更新されていないことを示す。したがって、isStringModifiedがtrueである文字列又は部分文字列は、更新領域に対応し、isStringModifiedがfalseである文字列又は部分文字列は、非更新領域に対応する。
 また、isVisibleがtrueのとき、文字列又は部分文字列が表示されていることを示し、isVisibleがfalseのとき、文字列又は部分文字列が表示されていないことを示す。文字列又は部分文字列は画面上に表示されるため、RenderedString1002のisVisibleはtrueに設定される。
 図11は、図10のDOM情報413を用いた場合に、図7のステップ703又は図9のステップ905において行われる画面更新処理の例を示すフローチャートである。まず、処理部402は、DOM情報413に含まれる1つの要素を選択し(ステップ1101)、選択した要素が表す文字列の幅及び高さを計算する(ステップ1102)。そして、処理部402は、計算した幅及び高さに基づいて、その文字列を分割するか否かを判定する(ステップ1103)。
 例えば、処理部402は、計算した幅及び高さが指定された描画領域に収まる場合、文字列を分割しないと判定し、幅又は高さが描画領域に収まらない場合、文字列を分割すると判定することができる。
 文字列を分割する場合(ステップ1103,YES)、処理部402は、その文字列を、描画領域に収まる幅及び高さを有する複数の部分文字列に分割する(ステップ1104)。そして、処理部402は、1つの部分文字列を描画対象として選択し(ステップ1105)、選択した部分文字列について部分文字列描画処理を行う(ステップ1106)。これにより、選択した部分文字列の描画データが裏画面の描画バッファに格納される。
 次に、処理部402は、すべての部分文字列を選択したか否かをチェックする(ステップ1107)。未選択の部分文字列が残っている場合(ステップ1107,NO)、処理部402は、次の部分文字列についてステップ1105以降の処理を繰り返す。
 そして、すべての部分文字列を選択した場合(ステップ1107,YES)、処理部402は、DOM情報413に含まれるすべての要素を選択したか否かをチェックする(ステップ1108)。未選択の要素が残っている場合(ステップ1108,NO)、処理部402は、次の要素についてステップ1101以降の処理を繰り返す。
 一方、文字列を分割しない場合(ステップ1103,NO)、処理部402は、その文字列について文字列描画処理を行う(ステップ1110)。これにより、文字列の描画データが裏画面の描画バッファに格納される。そして、処理部402は、ステップ1108以降の処理を行う。
 すべての要素を選択した場合(ステップ1108,YES)、処理部402は、裏画面の描画バッファと表画面の描画バッファとを入れ替えることで、裏画面に描画したHTMLコンテンツ412を画面上に表示する(ステップ1109)。
 図12は、図11のステップ1106における部分文字列描画処理の例を示すフローチャートである。まず、処理部402は、TextRun1001のstring[]を参照して、部分文字列を表すRenderedString1002が存在するか否かをチェックする(ステップ1201)。HTMLコンテンツ412の初回表示時には、RenderedString1002が未だ存在しておらず、HTMLコンテンツ412の更新時には、RenderedString1002が存在している。
 RenderedString1002が存在しない場合(ステップ1201,NO)、処理部402は、部分文字列を表すRenderedString1002を生成し、そのisVisibleにtrueを設定する(ステップ1210)。
 次に、処理部402は、部分文字列の表示情報から描画データを生成し(ステップ1203)、生成した描画データを、RenderedString1002のcachedStringに格納する(ステップ1204)。
 次に、処理部402は、RenderedString1002のstringに部分文字列を格納し(ステップ1205)、isStringModifiedにtrueを設定する(ステップ1206)。
 次に、処理部402は、RenderedString1002をTextRun1001のstring[]に設定する(ステップ1207)。そして、処理部402は、生成した描画データを裏画面の描画バッファに格納することで、部分文字列を裏画面に描画する(ステップ1208)。
 一方、RenderedString1002が存在する場合(ステップ1201,YES)、処理部402は、描画対象の部分文字列がRenderedString1002のstringが表す部分文字列と同じか否かをチェックする(ステップ1202)。部分文字列が更新されていない場合、描画対象の部分文字列はstringが表す部分文字列と同じであり、部分文字列が更新されている場合、描画対象の部分文字列はstringが表す部分文字列とは異なっている。
 描画対象の部分文字列がstringが表す部分文字列とは異なっている場合(ステップ1202,NO)、処理部402は、ステップ1203以降の処理を行う。
 一方、描画対象の部分文字列がstringが表す部分文字列と同じである場合(ステップ1202,YES)、処理部402は、描画データ生成をスキップする。そして、処理部402は、RenderedString1002のisStringModifiedをtrueからfalseへ変更し(ステップ1209)、ステップ1208の処理を行う。この場合、生成した描画データの代わりに、cachedStringに格納されている描画データが裏画面の描画バッファに格納される。
 図11のステップ1110における文字列描画処理では、図12のフローチャートにおいて部分文字列を文字列に置き換えた処理が行われる。
 図11の画面更新処理によれば、複数の部分文字列に分割された文字列を再描画する場合に、非更新領域に対応する部分文字列の描画データ生成をスキップすることで、生成する描画データのデータ量がさらに削減される。これにより、描画データ生成処理の処理時間をさらに削減することができる。
 図2及び図4の描画データ生成装置201の構成は一例に過ぎず、描画データ生成装置201の用途又は条件に応じて一部の構成要素を省略又は変更してもよい。例えば、描画データ生成装置201の外部の装置によって描画データが表示される場合は、図4の表示部403を省略することができる。図4の描画データ生成装置201は、3個以上の描画バッファを含んでいてもよい。
 図3、図7~図9、図11、及び図12のフローチャートは一例に過ぎず、描画データ生成装置201の構成又は条件に応じて一部の処理を省略又は変更してもよい。例えば、外部の装置によってDOM情報413が生成される場合は、図7のステップ701及びステップ702の処理を省略することができ、外部の装置によって描画データが表示される場合は、図8のステップ809及び図11のステップ1109の処理を省略することができる。
 図1の描画データは一例に過ぎず、描画データは、描画対象のコンテンツに応じて変化する。描画対象のコンテンツは、HTMLコンテンツ412に限られず、eXtensible Markup Language(XML)で記述されたコンテンツのように、階層化構造を有する別のコンテンツであってもよい。図5のHTMLブラウザ411の構成は一例に過ぎず、一部の構成要素を省略又は変更してもよい。図6及び図10のDOM情報413は一例に過ぎず、一部の属性を省略又は変更してもよい。
 図13は、図2及び図4の描画データ生成装置201として用いられる情報処理装置(コンピュータ)の構成例を示している。図13の情報処理装置は、CPU1301(プロセッサ)、メモリ1302、入力装置1303、補助記憶装置1304、媒体駆動装置1305、ネットワーク接続装置1306、Graphics Processing Unit(GPU)1307、及び表示装置1308を含む。情報処理装置は、さらに描画バッファ211-1及び描画バッファ211-2を含む。
 CPU1301、メモリ1302、入力装置1303、補助記憶装置1304、媒体駆動装置1305、ネットワーク接続装置1306、及びGPU1307は、バス1309により互いに接続されている。描画バッファ211-1、描画バッファ211-2、及び表示装置1308は、GPU1307に接続されている。
 メモリ1302は、例えば、Read Only Memory(ROM)、Random Access Memory(RAM)、フラッシュメモリ等の半導体メモリであり、描画データ生成処理に用いられるプログラム及びデータを格納する。メモリ1302は、図4の記憶部404として用いることができる。
 CPU1301は、例えば、メモリ1302を利用してプログラムを実行することにより、図2の生成部212及び図4の処理部402として動作する。
 入力装置1303は、例えば、キーボード、ポインティングデバイス等であり、オペレータ又はユーザからの指示又は情報の入力に用いられる。
 補助記憶装置1304は、例えば、磁気ディスク装置、光ディスク装置、光磁気ディスク装置、テープ装置等である。補助記憶装置1304は、ハードディスクドライブであってもよい。情報処理装置は、補助記憶装置1304にプログラム及びデータを格納しておき、それらをメモリ1302にロードして使用することができる。補助記憶装置1304は、図4の記憶部404として用いることができる。
 媒体駆動装置1305は、可搬型記録媒体1310を駆動し、その記録内容にアクセスする。可搬型記録媒体1310は、メモリデバイス、フレキシブルディスク、光ディスク、光磁気ディスク等である。可搬型記録媒体1310は、Compact Disk Read Only Memory(CD-ROM)、Digital Versatile Disk(DVD)、Universal Serial Bus(USB)メモリ等であってもよい。オペレータ又はユーザは、この可搬型記録媒体1310にプログラム及びデータを格納しておき、それらをメモリ1302にロードして使用することができる。
 このように、描画データ生成処理に用いられるプログラム及びデータを格納するコンピュータ読み取り可能な記録媒体は、メモリ1302、補助記憶装置1304、又は可搬型記録媒体1310のような、物理的な(非一時的な)記録媒体である。
 ネットワーク接続装置1306は、Local Area Network、Wide Area Network等の通信ネットワークに接続され、通信に伴うデータ変換を行う通信インタフェースである。情報処理装置は、プログラム及びデータを外部の装置からネットワーク接続装置1306を介して受信し、それらをメモリ1302にロードして使用することができる。ネットワーク接続装置1306は、図4の通信部401として用いることができる。
 表示装置1308は、オペレータ又はユーザへの問い合わせ又は指示、及び処理結果を画面上に表示する。処理結果は、HTMLコンテンツ412の描画データであってもよい。表示装置1308は、図4の表示部403として用いることができる。
 GPU1307は、CPU1301からの指示に従って、描画データを裏画面の描画バッファに格納する処理を行う。GPU1307は、CPU1301からの指示に従って、裏画面の描画バッファと表画面の描画バッファとを入れ替えることで、裏画面に描画したHTMLコンテンツ412を表示装置1308の画面上に表示する処理も行う。
 なお、情報処理装置が図13のすべての構成要素を含む必要はなく、用途又は条件に応じて一部の構成要素を省略することも可能である。例えば、可搬型記録媒体1310を使用しない場合は、媒体駆動装置1305を省略してもよい。情報処理装置は、3個以上の描画バッファを含んでいてもよい。
 GPU1307が描画処理を行う代わりに、CPU1301がGPU1307の動作をエミュレートすることも可能である。この場合、GPU1307、描画バッファ211-1、及び描画バッファ211-2が省略され、メモリ1302内に2つの描画バッファが設けられる。
 開示の実施形態とその利点について詳しく説明したが、当業者は、特許請求の範囲に明確に記載した本発明の範囲から逸脱することなく、様々な変更、追加、省略をすることができるであろう。

Claims (9)

  1.  コンテンツの階層化構造の解析結果に応じて、前記コンテンツの表示情報から描画データを生成し、
     前記描画データを複数の描画バッファのうち第1描画バッファに格納し、
     前記コンテンツの更新に応じて、前記解析結果に基づき、前記コンテンツの前記表示情報のうち非更新領域と更新領域とを特定し、
     前記更新領域の更新後の表示情報から更新描画データを生成し、
     前記第1描画バッファに格納した前記非更新領域の描画データと、前記更新描画データとを、前記複数の描画バッファのうち第2描画バッファに格納する、
    処理をコンピュータに実行させる描画データ生成プログラム。
  2.  前記コンピュータは、前記階層化構造に含まれる複数の要素それぞれの表示情報から前記描画データを生成し、前記複数の要素それぞれの前記描画データを前記第1描画バッファに格納し、前記複数の要素それぞれが前記非更新領域又は前記更新領域のいずれに対応するかを特定し、前記非更新領域に対応する要素の描画データ生成をスキップし、前記更新領域に対応する要素の前記更新描画データを生成し、前記第1描画バッファに格納した前記非更新領域に対応する要素の前記描画データと、前記更新領域に対応する要素の前記更新描画データとを、前記第2描画バッファに格納することを特徴とする請求項1記載の描画データ生成プログラム。
  3.  前記コンピュータは、前記複数の要素のうち特定の要素に含まれる文字列を複数の部分文字列に分割し、前記複数の部分文字列それぞれの表示情報から前記描画データを生成し、前記複数の部分文字列それぞれの前記描画データを前記第1描画バッファに格納し、前記複数の部分文字列それぞれが前記非更新領域又は前記更新領域のいずれに対応するかを特定し、前記非更新領域に対応する部分文字列の描画データ生成をスキップし、前記更新領域に対応する部分文字列の前記更新描画データを生成し、前記第1描画バッファに格納した前記非更新領域に対応する部分文字列の前記描画データと、前記更新領域に対応する部分文字列の前記更新描画データとを、前記第2描画バッファに格納することを特徴とする請求項2記載の描画データ生成プログラム。
  4.  複数の描画バッファと、
     コンテンツの階層化構造の解析結果に応じて、前記コンテンツの表示情報から描画データを生成し、前記描画データを前記複数の描画バッファのうち第1描画バッファに格納し、前記コンテンツの更新に応じて、前記解析結果に基づき、前記コンテンツの前記表示情報のうち非更新領域と更新領域とを特定し、前記更新領域の更新後の表示情報から更新描画データを生成し、前記第1描画バッファに格納した前記非更新領域の描画データと、前記更新描画データとを、前記複数の描画バッファのうち第2描画バッファに格納する生成部と、
    を備えることを特徴とする描画データ生成装置。
  5.  前記生成部は、前記階層化構造に含まれる複数の要素それぞれの表示情報から前記描画データを生成し、前記複数の要素それぞれの前記描画データを前記第1描画バッファに格納し、前記複数の要素それぞれが前記非更新領域又は前記更新領域のいずれに対応するかを特定し、前記非更新領域に対応する要素の描画データ生成をスキップし、前記更新領域に対応する要素の前記更新描画データを生成し、前記第1描画バッファに格納した前記非更新領域に対応する要素の前記描画データと、前記更新領域に対応する要素の前記更新描画データとを、前記第2描画バッファに格納することを特徴とする請求項4記載の描画データ生成装置。
  6.  前記生成部は、前記複数の要素のうち特定の要素に含まれる文字列を複数の部分文字列に分割し、前記複数の部分文字列それぞれの表示情報から前記描画データを生成し、前記複数の部分文字列それぞれの前記描画データを前記第1描画バッファに格納し、前記複数の部分文字列それぞれが前記非更新領域又は前記更新領域のいずれに対応するかを特定し、前記非更新領域に対応する部分文字列の描画データ生成をスキップし、前記更新領域に対応する部分文字列の前記更新描画データを生成し、前記第1描画バッファに格納した前記非更新領域に対応する部分文字列の前記描画データと、前記更新領域に対応する部分文字列の前記更新描画データとを、前記第2描画バッファに格納することを特徴とする請求項5記載の描画データ生成装置。
  7.  コンピュータが、
     コンテンツの階層化構造の解析結果に応じて、前記コンテンツの表示情報から描画データを生成し、
     前記描画データを複数の描画バッファのうち第1描画バッファに格納し、
     前記コンテンツの更新に応じて、前記解析結果に基づき、前記コンテンツの前記表示情報のうち非更新領域と更新領域とを特定し、
     前記更新領域の更新後の表示情報から更新描画データを生成し、
     前記第1描画バッファに格納した前記非更新領域の描画データと、前記更新描画データとを、前記複数の描画バッファのうち第2描画バッファに格納する、
    ことを特徴とする描画データ生成方法。
  8.  前記コンピュータは、前記階層化構造に含まれる複数の要素それぞれの表示情報から前記描画データを生成し、前記複数の要素それぞれの前記描画データを前記第1描画バッファに格納し、前記複数の要素それぞれが前記非更新領域又は前記更新領域のいずれに対応するかを特定し、前記非更新領域に対応する要素の描画データ生成をスキップし、前記更新領域に対応する要素の前記更新描画データを生成し、前記第1描画バッファに格納した前記非更新領域に対応する要素の前記描画データと、前記更新領域に対応する要素の前記更新描画データとを、前記第2描画バッファに格納することを特徴とする請求項7記載の描画データ生成方法。
  9.  前記コンピュータは、前記複数の要素のうち特定の要素に含まれる文字列を複数の部分文字列に分割し、前記複数の部分文字列それぞれの表示情報から前記描画データを生成し、前記複数の部分文字列それぞれの前記描画データを前記第1描画バッファに格納し、前記複数の部分文字列それぞれが前記非更新領域又は前記更新領域のいずれに対応するかを特定し、前記非更新領域に対応する部分文字列の描画データ生成をスキップし、前記更新領域に対応する部分文字列の前記更新描画データを生成し、前記第1描画バッファに格納した前記非更新領域に対応する部分文字列の前記描画データと、前記更新領域に対応する部分文字列の前記更新描画データとを、前記第2描画バッファに格納することを特徴とする請求項8記載の描画データ生成方法。
PCT/JP2016/072239 2016-07-28 2016-07-28 描画データ生成プログラム、描画データ生成装置、及び描画データ生成方法 WO2018020647A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2018530289A JP6699730B2 (ja) 2016-07-28 2016-07-28 描画データ生成プログラム、描画データ生成装置、及び描画データ生成方法
PCT/JP2016/072239 WO2018020647A1 (ja) 2016-07-28 2016-07-28 描画データ生成プログラム、描画データ生成装置、及び描画データ生成方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2016/072239 WO2018020647A1 (ja) 2016-07-28 2016-07-28 描画データ生成プログラム、描画データ生成装置、及び描画データ生成方法

Publications (1)

Publication Number Publication Date
WO2018020647A1 true WO2018020647A1 (ja) 2018-02-01

Family

ID=61015847

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/072239 WO2018020647A1 (ja) 2016-07-28 2016-07-28 描画データ生成プログラム、描画データ生成装置、及び描画データ生成方法

Country Status (2)

Country Link
JP (1) JP6699730B2 (ja)
WO (1) WO2018020647A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019204270A (ja) * 2018-05-23 2019-11-28 キヤノン株式会社 画像処理装置、画像処理方法およびプログラム

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0850659A (ja) * 1993-11-16 1996-02-20 Firstperson Inc フルモーション動画のntsc式表示装置および方法
JP2004350185A (ja) * 2003-05-26 2004-12-09 Seiko Epson Corp 画像処理装置、画像処理方法及び画像処理のためのプログラム
JP2009539147A (ja) * 2006-06-01 2009-11-12 クゥアルコム・インコーポレイテッド 表示可能なコンテンツの一部を選択的にダブル・バッファリングする装置および方法
JP2015125509A (ja) * 2013-12-25 2015-07-06 キヤノン株式会社 画像処理装置、画像処理方法およびプログラム

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0850659A (ja) * 1993-11-16 1996-02-20 Firstperson Inc フルモーション動画のntsc式表示装置および方法
JP2004350185A (ja) * 2003-05-26 2004-12-09 Seiko Epson Corp 画像処理装置、画像処理方法及び画像処理のためのプログラム
JP2009539147A (ja) * 2006-06-01 2009-11-12 クゥアルコム・インコーポレイテッド 表示可能なコンテンツの一部を選択的にダブル・バッファリングする装置および方法
JP2015125509A (ja) * 2013-12-25 2015-07-06 キヤノン株式会社 画像処理装置、画像処理方法およびプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GEARY DAVID, PROGRAMMING HTML5 CANVAS, 23 July 2014 (2014-07-23), pages 289 - 333, ISBN: 978-4-87311-687-7 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019204270A (ja) * 2018-05-23 2019-11-28 キヤノン株式会社 画像処理装置、画像処理方法およびプログラム
JP7154822B2 (ja) 2018-05-23 2022-10-18 キヤノン株式会社 プログラム、画像処理装置、及び制御方法

Also Published As

Publication number Publication date
JP6699730B2 (ja) 2020-05-27
JPWO2018020647A1 (ja) 2019-05-16

Similar Documents

Publication Publication Date Title
US20180374184A1 (en) Methods and apparatuses for providing a hardware accelerated web engine
US8881055B1 (en) HTML pop-up control
EP2805258B1 (en) Low resolution placeholder content for document navigation
US9600447B2 (en) Methods and systems for page layout using a virtual art director
US9514242B2 (en) Presenting dynamically changing images in a limited rendering environment
US20150193401A1 (en) Electronic apparatus and operating method of web-platform
US20030184552A1 (en) Apparatus and method for graphics display system for markup languages
US20120144288A1 (en) Web page content display priority and bandwidth management
US9224367B2 (en) Image processing apparatus, image processing method, and image processing program
CN108256062B (zh) 网页动画实现方法、装置、电子设备、存储介质
US9195772B2 (en) Delayed image decoding
CN104809123A (zh) 一种网页渲染方法及系统
CN112667330A (zh) 一种页面显示方法及计算机设备
JP2001117750A (ja) 表示制御装置および表示方法
US9430808B2 (en) Synchronization points for state information
EP3008697B1 (en) Coalescing graphics operations
JP6699730B2 (ja) 描画データ生成プログラム、描画データ生成装置、及び描画データ生成方法
US10002400B2 (en) Method and apparatus for dynamic generation of vector graphics
US20160342570A1 (en) Document presentation qualified by conditions evaluated on rendering
CN114756797A (zh) 一种页面处理方法、装置、电子设备和存储介质
US9685140B1 (en) Optimized rendering of multimedia content
JP6721049B2 (ja) ページ表示プログラム、ページ表示装置、及びページ表示方法
JP2010186295A (ja) 情報検索システム及び情報検索方法並びにプログラム
JP2003345788A (ja) 電子文書表示方法、電子文書表示装置、電子文書表示プログラムおよび電子文書表示プログラムを記録した機械読取り可能な記録媒体

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16910550

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2018530289

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16910550

Country of ref document: EP

Kind code of ref document: A1