summaryrefslogtreecommitdiffstats
path: root/cc/resource_update.h
blob: 402651d6c09eb1f48e8b043d005457b17a97151b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CC_RESOURCE_UPDATE_H_
#define CC_RESOURCE_UPDATE_H_

#include "IntRect.h"

class SkBitmap;
class SkPicture;

namespace cc {

class CCPrioritizedTexture;

struct ResourceUpdate {
    static ResourceUpdate Create(CCPrioritizedTexture*,
                                 const SkBitmap*,
                                 IntRect content_rect,
                                 IntRect source_rect,
                                 IntSize dest_offset);
    static ResourceUpdate CreateFromPicture(CCPrioritizedTexture*,
                                            SkPicture*,
                                            IntRect content_rect,
                                            IntRect source_rect,
                                            IntSize dest_offset);

    ResourceUpdate();
    virtual ~ResourceUpdate();

    CCPrioritizedTexture* texture;
    const SkBitmap* bitmap;
    SkPicture* picture;
    IntRect content_rect;
    IntRect source_rect;
    IntSize dest_offset;
};

}

#endif  // CC_RESOURCE_UPDATE_H_