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.)

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

mercurial