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

Side by Side Diff: cc/image_layer_updater.h

Issue 11304020: cc: Nine patch layer. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix DCHECK failures and rebase to 166129 Created 8 years, 1 month 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
« 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 ImageLayerUpdater_h
6 #define ImageLayerUpdater_h
7
8 #include "config.h"
9
10 #include "cc/layer_updater.h"
11
12 namespace cc {
13
14 class ResourceUpdateQueue;
15
16 class ImageLayerUpdater : public LayerUpdater {
17 public:
18 class Resource : public LayerUpdater::Resource {
19 public:
20 Resource(ImageLayerUpdater* updater, scoped_ptr<PrioritizedTexture> text ure)
21 : LayerUpdater::Resource(texture.Pass())
22 , m_updater(updater)
23 {
24 }
25
26 virtual void update(ResourceUpdateQueue&, const gfx::Rect& sourceRect, c onst gfx::Vector2d& destOffset, bool partialUpdate, RenderingStats&) OVERRIDE;
27
28 private:
29 ImageLayerUpdater* m_updater;
30 };
31
32 static scoped_refptr<ImageLayerUpdater> create();
33
34 virtual scoped_ptr<LayerUpdater::Resource> createResource(
35 PrioritizedTextureManager*) OVERRIDE;
36
37 void updateTexture(ResourceUpdateQueue&, PrioritizedTexture*, const gfx::Rec t& sourceRect, const gfx::Vector2d& destOffset, bool partialUpdate);
38
39 void setBitmap(const SkBitmap&);
40
41 private:
42 ImageLayerUpdater() { }
43 virtual ~ImageLayerUpdater() { }
44
45 SkBitmap m_bitmap;
46 };
47
48 }
49
50 #endif
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