gfx/skia/trunk/src/animator/SkBoundable.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

michael@0 1
michael@0 2 /*
michael@0 3 * Copyright 2006 The Android Open Source Project
michael@0 4 *
michael@0 5 * Use of this source code is governed by a BSD-style license that can be
michael@0 6 * found in the LICENSE file.
michael@0 7 */
michael@0 8
michael@0 9
michael@0 10 #ifndef SkBoundable_DEFINED
michael@0 11 #define SkBoundable_DEFINED
michael@0 12
michael@0 13 #include "SkDrawable.h"
michael@0 14 #include "SkRect.h"
michael@0 15
michael@0 16 class SkBoundable : public SkDrawable {
michael@0 17 public:
michael@0 18 SkBoundable();
michael@0 19 virtual void clearBounder();
michael@0 20 virtual void enableBounder();
michael@0 21 virtual void getBounds(SkRect* );
michael@0 22 bool hasBounds() { return fBounds.fLeft != (int16_t)0x8000U; }
michael@0 23 void setBounds(SkIRect& bounds) { fBounds = bounds; }
michael@0 24 protected:
michael@0 25 void clearBounds() { fBounds.fLeft = (int16_t) SkToU16(0x8000); }; // mark bounds as unset
michael@0 26 SkIRect fBounds;
michael@0 27 private:
michael@0 28 typedef SkDrawable INHERITED;
michael@0 29 };
michael@0 30
michael@0 31 class SkBoundableAuto {
michael@0 32 public:
michael@0 33 SkBoundableAuto(SkBoundable* boundable, SkAnimateMaker& maker);
michael@0 34 ~SkBoundableAuto();
michael@0 35 private:
michael@0 36 SkBoundable* fBoundable;
michael@0 37 SkAnimateMaker& fMaker;
michael@0 38 SkBoundableAuto& operator= (const SkBoundableAuto& );
michael@0 39 };
michael@0 40
michael@0 41 #endif // SkBoundable_DEFINED

mercurial