JP2012123739A - Drawing processing apparatus, drawing processing method, and program - Google Patents
Drawing processing apparatus, drawing processing method, and program Download PDFInfo
- Publication number
- JP2012123739A JP2012123739A JP2010276113A JP2010276113A JP2012123739A JP 2012123739 A JP2012123739 A JP 2012123739A JP 2010276113 A JP2010276113 A JP 2010276113A JP 2010276113 A JP2010276113 A JP 2010276113A JP 2012123739 A JP2012123739 A JP 2012123739A
- Authority
- JP
- Japan
- Prior art keywords
- drawing command
- internal data
- generating
- command
- generated
- 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
Links
Images
Abstract
Description
本発明は、例えば、アニメーションを含む画面を描画するために用いて好適な描画処理装置、描画処理方法及びプログラムに関する。 The present invention relates to a drawing processing apparatus, a drawing processing method, and a program suitable for use in, for example, drawing a screen including animation.
近年、表示機能を有する機器において様々なアニメーション効果を含むグラフィカルユーザインターフェース(GUI)が普及してきている。アニメーション効果としては、例えば、図形や画像、文字などに対して拡大縮小、回転、透明度を含む色情報の変化、モーフィングをさせるものなどがある。これらのアニメーション効果を機器のGUIとしてスムースに表示させるために、これまで様々な高速化の工夫がなされてきた。 In recent years, a graphical user interface (GUI) including various animation effects has become widespread in devices having a display function. As the animation effect, for example, there is an effect of scaling, rotating, changing color information including transparency, and morphing a figure, image, character or the like. In order to smoothly display these animation effects as a GUI of the device, various speedups have been made so far.
従来、アニメーション効果を含むコンテンツを描画する際には、フレーム間で属性の変更があったグラフィックスだけを包含する矩形領域を再描画する方法が一般的であった。この方法は再描画する領域を限定するので描画処理を高速化させることが期待できる。また、別の方法として、グラフィックスの一部を画像データに変換してキャッシュするスプライトと呼ばれる方法が開示されている(例えば、特許文献1参照)。この方法ではすでに描画された結果を利用するので、グラフィックスを解析して描画命令を作成する処理を省略できる。さらには、グラフィックスを解析して作成した描画命令をキャッシュし、それを適宜変更して描画を行う方法も開示されている(例えば、特許文献2参照)。 Conventionally, when drawing content including an animation effect, a method of redrawing a rectangular region including only graphics whose attributes have changed between frames has been common. Since this method limits the area to be redrawn, it can be expected to speed up the drawing process. As another method, there is disclosed a method called sprite that converts a part of graphics into image data and caches the image data (see, for example, Patent Document 1). In this method, since the already drawn result is used, it is possible to omit the process of generating the drawing command by analyzing the graphics. Furthermore, a method is also disclosed in which a rendering command created by analyzing graphics is cached, and rendering is performed by appropriately changing the rendering command (see, for example, Patent Document 2).
アニメーション効果を含むコンテンツを描画する際に、毎フレームで描画命令を生成すると描画時間が多くかかり、アニメーション時にコマ落ちしてしまう可能性がある。そこで、再描画する領域を限定する方法を用いることが考えられるが、1フレーム目においては表示領域に含まれるグラフィックス全てを描画しなければならないので高速化の効果があまり得られない。また、アニメーションするタイミングによって再描画領域が一時的に大きくなる場合についても高速化の効果は期待できない。 When drawing a content including an animation effect, if a drawing command is generated every frame, it takes a lot of drawing time, and frames may be dropped during animation. Therefore, it is conceivable to use a method for limiting the area to be redrawn. However, since all the graphics included in the display area have to be drawn in the first frame, the effect of increasing the speed is not obtained so much. In addition, the speed-up effect cannot be expected even when the redrawing area temporarily increases depending on the animation timing.
また、特許文献1に記載の方法では、描画結果を画像データとして保持するため大量のメモリ容量を必要とする。さらに、デバイスによって出力サイズが異なる場合には、保持している画像データを伸縮しなければならないため、画質が劣化するという問題も生じる。さらに、特許文献2に記載の方法では、全てのグラフィックスに関する描画命令を保持するため、グラフィックスの数やアニメーション時間によっては大量のメモリ容量を必要とする。
Further, the method described in
本発明は前述の問題点に鑑み、メモリの使用量を抑えるとともに、描画処理を高速化できるようにすることを目的としている。 SUMMARY OF THE INVENTION In view of the above-described problems, the present invention has an object to reduce the amount of memory used and to speed up the drawing process.
本発明の描画処理装置は、グラフィックス情報と前記グラフィックス情報の変化を示すアニメーション情報とを含む描画コンテンツを解析して、内部データを生成する内部データ生成手段と、前記内部データ生成手段により生成された内部データに基づいて描画命令を生成する描画命令生成手段と、前記描画命令生成手段により生成された描画命令を用いて描画処理を行う描画手段と、前記内部データに基づいて前記描画命令生成手段により生成された描画命令を現在の時刻に相当する描画命令に更新する更新手段とを備え、前記描画手段は、前記更新手段によって描画命令が更新された場合に、前記現在の時刻に該当するフレームに対して前記更新された描画命令を用いて描画処理を行うことを特徴とする。 The drawing processing apparatus of the present invention analyzes drawing content including graphics information and animation information indicating a change in the graphics information, generates internal data, and generates the internal data by the internal data generating unit A drawing command generating unit that generates a drawing command based on the internal data generated; a drawing unit that performs a drawing process using the drawing command generated by the drawing command generating unit; and the drawing command generation based on the internal data Updating means for updating the drawing instruction generated by the means to a drawing instruction corresponding to the current time, and the drawing means corresponds to the current time when the drawing instruction is updated by the updating means. A drawing process is performed on the frame using the updated drawing command.
本発明によれば、メモリの使用量を抑えるとともに、描画処理を高速化することができる。 According to the present invention, it is possible to reduce the amount of memory used and to speed up the drawing process.
以下、本発明の実施形態について、図面を参照しながら説明する。
図1は、本実施形態の描画処理装置100のハード構成例を示すブロック図である。
図1において、CPU101はシステム制御部であり、描画処理装置100全体を制御する。ROM102は、変更を必要としないプログラムやパラメータを格納する読み取り専用のメモリである。RAM103は、外部装置などから供給されるプログラムやデータを一時記憶する書き換え可能なメモリであり、後述する内部データや描画命令がRAM103に格納される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram illustrating a hardware configuration example of the
In FIG. 1, a
入力部104は、ユーザの操作を受け、データを入力するポインティングデバイスやキーボードなどの入力デバイス107とのインターフェイスである。出力部105は、描画処理装置100により出力されたデータを表示するためのモニタ108とのインターフェイスである。システムバス106はCPU101〜出力部105の各ユニットを通信可能に接続するバスである。
The
なお、説明した構成に対して、プログラムコードを供給するための記憶媒体として、ROM102のほかに以下のものを用いてもよい。例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、メモリカード、DVDなどが本実施形態の描画処理装置100の構成に加わってもよい。
In addition to the
図2は、本実施形態の描画処理装置100の機能構成例を示すブロック図である。
図2に示す描画処理装置100において、描画コンテンツ解析部202は、入力された描画コンテンツ201を解析する。そして、内部データ生成部203は、その解析結果から内部形式のデータである内部データを生成する。描画命令生成部204は、生成した内部データをもとに各グラフィックスに関する描画命令を生成する。
FIG. 2 is a block diagram illustrating a functional configuration example of the
In the
現在時刻取得部205は、フレームを描画する際の時刻の情報を取得する。そして、描画命令更新判別部206は、前記内部データと現在時刻取得部205で取得した時刻とから、描画命令生成部204で生成された描画命令を更新するか否かを判別する。そして、描画命令を更新すると判別されると、描画命令更新部207は、グラフィックスの描画命令を更新する。描画処理部208は、描画命令生成部204であらかじめ生成された描画命令、または描画命令更新部207で更新された描画命令をもとに描画処理を行い、描画結果を表示部209に出力する。
The current
図3は、本実施形態の描画処理装置100で描画させる描画コンテンツの一例を示す図である。図3に示す描画コンテンツは図形301と図形302とで構成されており、描画開始から3秒後に図形302が4秒間かけて位置303まで移動するアニメーション情報が定義されている。図4は、前述の描画コンテンツをXML(eXtensible Markup Language)形式の構造化文書である2次元ベクトルグラフィックスフォーマットSVG(Scalable Vector Graphics)での記述例を示す図である。本実施形態では、図4に示したSVGデータを入力データとしているが、グラフィックスに関する形状情報、透明度を含む色情報、位置情報、状態情報が含まれているのであれば、SVGデータに限らず、構造化文書でなくてもよい。また、図形だけでなく、画像、文字などのグラフィックス情報が描画コンテンツに含まれていてもよい。
FIG. 3 is a diagram illustrating an example of drawing content drawn by the
図5は、本実施形態における前処理の手順の一例を示すフローチャートである。図5の説明では、図4に示すSVGデータを入力した場合を例に説明する。
はじめに、描画コンテンツ解析部202は、描画コンテンツ201として図4に示したSVGデータを解析し、内部データ生成部203は、解析結果に基づいて内部データを生成する(S501)。
FIG. 5 is a flowchart showing an example of a preprocessing procedure in the present embodiment. In the description of FIG. 5, a case where the SVG data shown in FIG. 4 is input will be described as an example.
First, the drawing
図6は、生成される内部データを表すモデルの一例を示す図である。本実施形態では、内部データをDocument Object Model(DOM)のツリー形式で表わしているが、DOMツリー形式でなくてもよい。図6に示す例は、ルートノードであるsvg要素601とその子要素であるcircle要素602とrect要素603とで構成されている。circle要素602及びrect要素603はそれぞれ、図3に示す図形301、302を表している。また、rect要素603の子要素として、animateTransform要素604があり、これは、図3の図形302が時間によってアニメーション(変化)することを表している。
FIG. 6 is a diagram illustrating an example of a model representing generated internal data. In the present embodiment, the internal data is represented in a document object model (DOM) tree format, but it may not be in the DOM tree format. The example illustrated in FIG. 6 includes an
次に、描画命令生成部204は、前記生成した内部データから特定のフレームを描画するのに必要な描画命令を作成する(S502)。本実施形態では最初のフレームに関する描画命令を作成するが、必ずしも最初のフレームである必要はなく、任意のフレームに相当する描画命令を作成してもよい。また、複数のフレームに関する描画命令を作成してもよい。
Next, the drawing
図7は、1フレーム目の描画命令セットの一例を示す図であり、図7の描画命令701、702がそれぞれ、図3の図形301、302の描画命令を表している。それぞれの描画命令は塗り方、変形、描画に関する命令で構成されているが、それら以外の命令が含まれていてもよい。また、「CIRCLE_DATA」には図形301の形状情報及び位置情報が格納され、「RECT_DATA」には、図形302の形状情報及び位置情報が格納されているものとする。
FIG. 7 is a diagram illustrating an example of a drawing command set for the first frame. Drawing commands 701 and 702 in FIG. 7 represent drawing commands for the
そして、内部データ生成部203は、前記描画コンテンツを構成する図形がアニメーションを開始する時刻の情報を生成した内部データから取得して処理を終了させる(S503)。本実施形態では、図形302がアニメーションを開始する時刻である3秒後という値の情報が取得される。
Then, the internal
図8は、本実施形態において、実際に描画処理を行う際の処理手順の一例を示すフローチャートである。本実施形態では、図8の処理を開始する場合、図5で示した手順により生成された内部データと1フレーム目に関する描画命令セットと、アニメーションの開始時刻の情報とを予め保持しておくことを前提とする。 FIG. 8 is a flowchart illustrating an example of a processing procedure when actually performing a drawing process in the present embodiment. In this embodiment, when starting the processing of FIG. 8, the internal data generated by the procedure shown in FIG. 5, the drawing command set relating to the first frame, and the information of the animation start time are held in advance. Assuming
はじめに、現在時刻取得部205は、現在の時刻の情報を取得する(S801)。本実施形態において時刻とは、描画処理を開始する時間を3秒としたときの相対時間をあらわし、1フレーム目の描画時である場合には、時刻0秒の情報が取得される。次に、描画命令更新判別部206は、図5のS503で取得したアニメーションの開始時刻とS801で取得した時刻とを比較する(S802)。この比較の結果、現在の時刻がアニメーションの開始時刻よりも前である場合は、描画処理部208は、図5のS502で作成した描画命令セットを用いて描画を行い(S803)、S801に戻る。
First, the current
一方、S802の比較の結果、そうでない場合は、描画命令更新部207は、予め保持している内部データをもとに、S801で取得した時刻における新たな描画命令を作成し、S502で作成した描画命令を更新する(S804)。そして、描画処理部208は、更新した描画命令を用いて描画処理を行い(S803)、S801に戻る。
On the other hand, as a result of the comparison in S802, if not, the drawing
図9は、S804にて更新されたあとの描画命令セットの一例を示す図である。図9に示す例は、描画処理が始まって3秒後からアニメーションが終了する7秒後までの間におけるフレームの描画命令セットを表している。図3の図形301に関する描画命令901は図7の描画命令701と変わらないが、図形302はアニメーション中であるため、描画命令902のSetMatrix関数の第2、第3引数がそれぞれtx、tyに更新されている。このtx、tyは図形302がアニメーションを開始する直前の位置からS801で取得した時刻までに移動する座標を表している。
FIG. 9 is a diagram illustrating an example of a drawing command set that has been updated in S804. The example shown in FIG. 9 represents a frame drawing command set from 3 seconds after the drawing process starts until 7 seconds after the animation ends. The
本実施形態においては、前フレームから変更のあった領域だけを再描画の対象とする部分更新機能を用いても構わない。その際、1フレーム目のようにフレームの全領域を描画する必要がある場合や、アニメーションによって前フレームからの変更部分が大きい場合に特に有効である。例えば、描画命令生成部204は、内部データから前フレームからの変更部分を包含する再描画領域の情報を取得し、再描画領域の大きさによって描画命令のフレームを決定してもよい。
In the present embodiment, a partial update function may be used in which only a region that has changed from the previous frame is subject to redrawing. In this case, it is particularly effective when it is necessary to draw the entire area of the frame as in the first frame, or when the changed portion from the previous frame is large due to animation. For example, the drawing
また、複数のフレームに関する描画命令を作成している場合には、描画命令更新部207は、現在の時刻に最も近いフレームの描画命令を選択し、その選択した描画命令を更新するようにしてもよい。
When drawing commands relating to a plurality of frames are created, the drawing
以上のように本実施形態によれば、描画コンテンツから内部データを生成し、生成した内部データと特定のフレームに関する描画命令とを用いて、アニメーションが開始されたフレームの描画命令を更新するようにした。これにより、フレームごとの描画命令を記憶する必要はなく、特定のフレームの描画を高速に行うことができる。 As described above, according to the present embodiment, the internal data is generated from the drawing content, and the drawing command for the frame where the animation is started is updated using the generated internal data and the drawing command for the specific frame. did. Thereby, it is not necessary to store a drawing command for each frame, and a specific frame can be drawn at high speed.
(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.
201 描画コンテンツ
203 内部データ生成部
204 描画命令生成部
207 描画命令更新部
208 描画処理部
201
Claims (10)
前記内部データ生成手段により生成された内部データに基づいて描画命令を生成する描画命令生成手段と、
前記描画命令生成手段により生成された描画命令を用いて描画処理を行う描画手段と、
前記内部データに基づいて前記描画命令生成手段により生成された描画命令を現在の時刻に相当する描画命令に更新する更新手段とを備え、
前記描画手段は、前記更新手段によって描画命令が更新された場合に、前記現在の時刻に該当するフレームに対して前記更新された描画命令を用いて描画処理を行うことを特徴とする描画処理装置。 Internal data generation means for generating internal data by analyzing drawing content including graphics information and animation information indicating a change in the graphics information;
A drawing command generating means for generating a drawing command based on the internal data generated by the internal data generating means;
A drawing unit that performs a drawing process using the drawing command generated by the drawing command generation unit;
Updating means for updating the drawing command generated by the drawing command generation unit based on the internal data to a drawing command corresponding to the current time;
When the drawing unit is updated by the updating unit, the drawing unit performs a drawing process on the frame corresponding to the current time using the updated drawing command. .
前記内部データ生成工程において生成された内部データに基づいて描画命令を生成する描画命令生成工程と、
前記描画命令生成工程において生成された描画命令を用いて描画処理を行う描画工程と、
前記内部データに基づいて前記描画命令生成工程において生成された描画命令を現在の時刻に相当する描画命令に更新する更新工程とを備え、
前記描画工程においては、前記更新工程において描画命令が更新された場合に、前記現在の時刻に該当するフレームに対して前記更新された描画命令を用いて描画処理を行うことを特徴とする描画処理方法。 An internal data generation step of generating internal data by analyzing drawing content including graphics information and animation information indicating a change in the graphics information;
A drawing command generating step for generating a drawing command based on the internal data generated in the internal data generating step;
A drawing step of performing a drawing process using the drawing command generated in the drawing command generation step;
Updating the drawing command generated in the drawing command generating step based on the internal data to a drawing command corresponding to the current time,
In the drawing step, when the drawing command is updated in the updating step, the drawing processing is performed on the frame corresponding to the current time by using the updated drawing command. Method.
前記内部データ生成工程において生成された内部データに基づいて描画命令を生成する描画命令生成工程と、
前記描画命令生成工程において生成された描画命令を用いて描画処理を行う描画工程と、
前記内部データに基づいて前記描画命令生成工程において生成された描画命令を現在の時刻に相当する描画命令に更新する更新工程とをコンピュータに実行させ、
前記描画工程においては、前記更新工程において描画命令が更新された場合に、前記現在の時刻に該当するフレームに対して前記更新された描画命令を用いて描画処理を行うことを特徴とするプログラム。 An internal data generation step of generating internal data by analyzing drawing content including graphics information and animation information indicating a change in the graphics information;
A drawing command generating step for generating a drawing command based on the internal data generated in the internal data generating step;
A drawing step of performing a drawing process using the drawing command generated in the drawing command generation step;
Updating the drawing command generated in the drawing command generation step based on the internal data to a drawing command corresponding to the current time;
In the drawing step, when the drawing command is updated in the updating step, the drawing process is performed on the frame corresponding to the current time by using the updated drawing command.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010276113A JP2012123739A (en) | 2010-12-10 | 2010-12-10 | Drawing processing apparatus, drawing processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010276113A JP2012123739A (en) | 2010-12-10 | 2010-12-10 | Drawing processing apparatus, drawing processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2012123739A true JP2012123739A (en) | 2012-06-28 |
Family
ID=46505086
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010276113A Pending JP2012123739A (en) | 2010-12-10 | 2010-12-10 | Drawing processing apparatus, drawing processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2012123739A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015052905A (en) * | 2013-09-06 | 2015-03-19 | キヤノン株式会社 | Image forming apparatus, image forming method, and computer program |
-
2010
- 2010-12-10 JP JP2010276113A patent/JP2012123739A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015052905A (en) * | 2013-09-06 | 2015-03-19 | キヤノン株式会社 | Image forming apparatus, image forming method, and computer program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4198909A1 (en) | Image rendering method and apparatus, and computer device and storage medium | |
CN108010112B (en) | Animation processing method, device and storage medium | |
US8234392B2 (en) | Methods and apparatuses for providing a hardware accelerated web engine | |
US8872838B2 (en) | Primitive composition | |
CN106575445B (en) | Fur avatar animation | |
US10535176B2 (en) | Animation techniques for mobile devices | |
US20090322760A1 (en) | Dynamic animation scheduling | |
KR20150080577A (en) | Sprite graphics rendering system | |
JP2003084744A (en) | Emulator, emulation method and program for executing the method and recording medium with the program recorded thereon | |
JP2008090818A (en) | Three-dimensional graphics rendering method and system for efficiently providing motion blur effect | |
JP6207618B2 (en) | Drawing device | |
US20220292690A1 (en) | Data generation method, data generation apparatus, model generation method, model generation apparatus, and program | |
JP3579775B2 (en) | Video generator | |
JP4827659B2 (en) | Image processing apparatus, image processing method, and computer program | |
WO2017002483A1 (en) | Program, information processing device, depth definition method, and recording medium | |
JP2012123739A (en) | Drawing processing apparatus, drawing processing method, and program | |
JP6547244B2 (en) | Operation processing apparatus, operation processing method and program | |
WO2008023819A1 (en) | Computer system and operation control method | |
JP2007286669A (en) | Image processor, method, and program | |
CN114797109A (en) | Object editing method and device, electronic equipment and storage medium | |
JP5317408B2 (en) | Information processing apparatus and information processing method | |
JP7329281B1 (en) | Information processing device, method, program, and system | |
JP2015075884A (en) | Drawing device, drawing method and program | |
JP2897755B2 (en) | Computer graphics display | |
CN117315088A (en) | Image generation method, device, equipment and medium of intelligent multimedia equipment |