Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: cc/image_layer_updater.h

Issue 12471007: Part 8 of cc/ directory shuffles: resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/image_layer.cc ('k') | cc/image_layer_updater.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_IMAGE_LAYER_UPDATER_H_
6 #define CC_IMAGE_LAYER_UPDATER_H_
7
8 #include "cc/layer_updater.h"
9 #include "third_party/skia/include/core/SkBitmap.h"
10
11 namespace cc {
12
13 class ResourceUpdateQueue;
14
15 class ImageLayerUpdater : public LayerUpdater {
16 public:
17 class Resource : public LayerUpdater::Resource {
18 public:
19 Resource(ImageLayerUpdater* updater,
20 scoped_ptr<PrioritizedResource> texture);
21 virtual ~Resource();
22
23 virtual void Update(ResourceUpdateQueue* queue,
24 gfx::Rect source_rect,
25 gfx::Vector2d dest_offset,
26 bool partial_update,
27 RenderingStats* stats) OVERRIDE;
28
29 private:
30 ImageLayerUpdater* updater_;
31
32 DISALLOW_COPY_AND_ASSIGN(Resource);
33 };
34
35 static scoped_refptr<ImageLayerUpdater> Create();
36
37 virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
38 PrioritizedResourceManager*) OVERRIDE;
39
40 void UpdateTexture(ResourceUpdateQueue* queue,
41 PrioritizedResource* texture,
42 gfx::Rect source_rect,
43 gfx::Vector2d dest_offset,
44 bool partial_update);
45
46 void set_bitmap(const SkBitmap& bitmap) { bitmap_ = bitmap; }
47
48 private:
49 ImageLayerUpdater() {}
50 virtual ~ImageLayerUpdater() {}
51
52 SkBitmap bitmap_;
53
54 DISALLOW_COPY_AND_ASSIGN(ImageLayerUpdater);
55 };
56
57 } // namespace cc
58
59 #endif // CC_IMAGE_LAYER_UPDATER_H_
OLDNEW
« no previous file with comments | « cc/image_layer.cc ('k') | cc/image_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698