Bug 724928 - Tell Gecko not to draw areas we aren't interested in. r=kats

Alter GeckoSoftwareLayerClient.beginDrawing so that it can return a rectangle
of the buffer that it's interested in. Gecko then uses this to clip the dirty
region, which often saves on unnecessary drawing during flings.
This commit is contained in:
Chris Lord
2012-02-09 17:28:10 +00:00
parent f9df3a2799
commit 4febd751ee
5 changed files with 91 additions and 29 deletions

View File

@@ -135,6 +135,8 @@ public:
int Left() { return mLeft; }
int Right() { return mRight; }
int Top() { return mTop; }
int Width() { return mRight - mLeft; }
int Height() { return mBottom - mTop; }
protected:
int mBottom;
@@ -161,7 +163,7 @@ public:
jobject LockBuffer();
unsigned char *LockBufferBits();
void UnlockBuffer();
bool BeginDrawing(int aWidth, int aHeight, int aTileWidth, int aTileHeight, const nsAString &aMetadata, bool aHasDirectTexture);
bool BeginDrawing(int aWidth, int aHeight, int aTileWidth, int aTileHeight, nsIntRect &aDirtyRect, const nsAString &aMetadata, bool aHasDirectTexture);
void EndDrawing(const nsIntRect &aRect);
private: