From 9a990c8ad4552e98587303c12d8cdcaf7790f1ec Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Thu, 3 May 2012 23:31:02 +0200 Subject: [PATCH] Bug 738413 - Part 1: Add OpaqueRect API to Azure DrawTargets. r=roc --- gfx/2d/2D.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gfx/2d/2D.h b/gfx/2d/2D.h index d8be372ffa3..0c00f5c9b00 100644 --- a/gfx/2d/2D.h +++ b/gfx/2d/2D.h @@ -779,9 +779,23 @@ public: void *GetUserData(UserDataKey *key) { return mUserData.Get(key); } + + /* Within this rectangle all pixels will be opaque by the time the result of + * this DrawTarget is first used for drawing. Either by the underlying surface + * being used as an input to external drawing, or Snapshot() being called. + * This rectangle is specified in device space. + */ + void SetOpaqueRect(const IntRect &aRect) { + mOpaqueRect = aRect; + } + + const IntRect &GetOpaqueRect() const { + return mOpaqueRect; + } protected: UserData mUserData; Matrix mTransform; + IntRect mOpaqueRect; bool mTransformDirty : 1; SurfaceFormat mFormat;