summaryrefslogtreecommitdiffstats
path: root/cc/resources/resource_update.h
blob: d49114171d4dd66c135e4db1aa933bde3f11f1d1 (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
// 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_RESOURCES_RESOURCE_UPDATE_H_
#define CC_RESOURCES_RESOURCE_UPDATE_H_

#include "cc/base/cc_export.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/vector2d.h"

class SkBitmap;

namespace cc {

class PrioritizedResource;

struct CC_EXPORT ResourceUpdate {
  static ResourceUpdate Create(PrioritizedResource* resource,
                               const SkBitmap* bitmap,
                               const gfx::Rect& content_rect,
                               const gfx::Rect& source_rect,
                               const gfx::Vector2d& dest_offset);

  ResourceUpdate();
  virtual ~ResourceUpdate();

  PrioritizedResource* texture;
  const SkBitmap* bitmap;
  gfx::Rect content_rect;
  gfx::Rect source_rect;
  gfx::Vector2d dest_offset;
};

}  // namespace cc

#endif  // CC_RESOURCES_RESOURCE_UPDATE_H_