Added "const" to many parameters.
Removed most data allocations/copying from PicturePlayer, ServerPicture now has to do this when converting coordinates. Added additional functions to ViewLayer to copy&convert multiple BPoint, BRect, BRegion to Screen coordinates, those should be further optimized. Removed some function call overhead. Note: some functions of PicturePlayer don't appear to be implented by PictureDataWriter, git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20292 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
/*
|
||||
* Copyright 2001-2006, Haiku Inc.
|
||||
* Copyright 2001-2007, Haiku Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Marc Flerackers ([email protected])
|
||||
* Stefano Ceccherini ([email protected])
|
||||
* Marcus Overhagen ([email protected])
|
||||
*/
|
||||
|
||||
/** PicturePlayer is used to create and play picture data. */
|
||||
/** PicturePlayer is used to play picture data. */
|
||||
|
||||
#ifndef _TPICTURE_H
|
||||
#define _TPICTURE_H
|
||||
@@ -22,51 +23,9 @@
|
||||
class PicturePlayer {
|
||||
public:
|
||||
PicturePlayer();
|
||||
PicturePlayer(const void *data, int32 size, BList *pictures);
|
||||
PicturePlayer(const void *data, size_t size, BList *pictures);
|
||||
virtual ~PicturePlayer();
|
||||
|
||||
int16 GetOp();
|
||||
int8 GetInt8();
|
||||
int16 GetInt16();
|
||||
int32 GetInt32();
|
||||
int64 GetInt64();
|
||||
float GetFloat();
|
||||
BPoint GetCoord();
|
||||
BRect GetRect();
|
||||
rgb_color GetColor();
|
||||
//void GetString(char *);
|
||||
|
||||
void *GetData(int32);
|
||||
void GetData(void *data, int32 size);
|
||||
|
||||
void AddInt8(int8);
|
||||
void AddInt16(int16);
|
||||
void AddInt32(int32);
|
||||
void AddInt64(int64);
|
||||
void AddFloat(float);
|
||||
void AddCoord(BPoint);
|
||||
void AddRect(BRect);
|
||||
void AddColor(rgb_color);
|
||||
void AddString(char *);
|
||||
|
||||
void AddData(void *data, int32 size);
|
||||
|
||||
// SwapOp();
|
||||
// SwapInt8();
|
||||
// SwapInt16();
|
||||
// SwapInt32();
|
||||
// SwapInt64();
|
||||
// SwapFloat();
|
||||
// SwapCoord();
|
||||
// SwapRect();
|
||||
// SwapIRect();
|
||||
// SwapColor();
|
||||
// SwapString();
|
||||
|
||||
// Swap();
|
||||
|
||||
// CheckPattern();
|
||||
|
||||
void BeginOp(int32);
|
||||
void EndOp();
|
||||
|
||||
@@ -78,11 +37,10 @@ virtual ~PicturePlayer();
|
||||
|
||||
status_t Play(void **callBackTable, int32 tableEntries,
|
||||
void *userData);
|
||||
status_t Rewind();
|
||||
|
||||
private:
|
||||
BMemoryIO fData;
|
||||
int32 fSize;
|
||||
const void *fData;
|
||||
size_t fSize;
|
||||
BList *fPictures;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user