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

Side by Side Diff: cc/bitmap_skpicture_content_layer_updater.h

Issue 11266030: Use gfx:: Geometry types for the resource provider and layer updater classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: uint8 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 | Annotate | Revision Log
« no previous file with comments | « cc/bitmap_content_layer_updater.cc ('k') | cc/bitmap_skpicture_content_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
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BitmapSkPictureContentLayerUpdater_h 5 #ifndef BitmapSkPictureContentLayerUpdater_h
6 #define BitmapSkPictureContentLayerUpdater_h 6 #define BitmapSkPictureContentLayerUpdater_h
7 7
8 #include "cc/skpicture_content_layer_updater.h" 8 #include "cc/skpicture_content_layer_updater.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 // This class records the contentRect into an SkPicture, then software rasterize s 13 // This class records the contentRect into an SkPicture, then software rasterize s
14 // the SkPicture into bitmaps for each tile. This implements Settings::perTilePa inting. 14 // the SkPicture into bitmaps for each tile. This implements Settings::perTilePa inting.
15 class BitmapSkPictureContentLayerUpdater : public SkPictureContentLayerUpdater { 15 class BitmapSkPictureContentLayerUpdater : public SkPictureContentLayerUpdater {
16 public: 16 public:
17 class Resource : public ContentLayerUpdater::Resource { 17 class Resource : public ContentLayerUpdater::Resource {
18 public: 18 public:
19 Resource(BitmapSkPictureContentLayerUpdater*, scoped_ptr<PrioritizedText ure>); 19 Resource(BitmapSkPictureContentLayerUpdater*, scoped_ptr<PrioritizedText ure>);
20 20
21 virtual void update(ResourceUpdateQueue&, const IntRect& sourceRect, con st IntSize& destOffset, bool partialUpdate, RenderingStats&) OVERRIDE; 21 virtual void update(ResourceUpdateQueue&, const gfx::Rect& sourceRect, c onst gfx::Vector2d& destOffset, bool partialUpdate, RenderingStats&) OVERRIDE;
22 22
23 private: 23 private:
24 BitmapSkPictureContentLayerUpdater* updater() { return m_updater; } 24 BitmapSkPictureContentLayerUpdater* updater() { return m_updater; }
25 25
26 SkBitmap m_bitmap; 26 SkBitmap m_bitmap;
27 BitmapSkPictureContentLayerUpdater* m_updater; 27 BitmapSkPictureContentLayerUpdater* m_updater;
28 }; 28 };
29 29
30 static scoped_refptr<BitmapSkPictureContentLayerUpdater> create(scoped_ptr<L ayerPainter>); 30 static scoped_refptr<BitmapSkPictureContentLayerUpdater> create(scoped_ptr<L ayerPainter>);
31 31
32 virtual scoped_ptr<LayerUpdater::Resource> createResource(PrioritizedTexture Manager*) OVERRIDE; 32 virtual scoped_ptr<LayerUpdater::Resource> createResource(PrioritizedTexture Manager*) OVERRIDE;
33 void paintContentsRect(SkCanvas*, const IntRect& sourceRect, RenderingStats& ); 33 void paintContentsRect(SkCanvas*, const gfx::Rect& sourceRect, RenderingStat s&);
34 34
35 private: 35 private:
36 explicit BitmapSkPictureContentLayerUpdater(scoped_ptr<LayerPainter>); 36 explicit BitmapSkPictureContentLayerUpdater(scoped_ptr<LayerPainter>);
37 virtual ~BitmapSkPictureContentLayerUpdater(); 37 virtual ~BitmapSkPictureContentLayerUpdater();
38 }; 38 };
39 39
40 } // namespace cc 40 } // namespace cc
41 41
42 #endif // BitmapSkPictureContentLayerUpdater_h 42 #endif // BitmapSkPictureContentLayerUpdater_h
OLDNEW
« no previous file with comments | « cc/bitmap_content_layer_updater.cc ('k') | cc/bitmap_skpicture_content_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698