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

Side by Side Diff: cc/resources/skpicture_content_layer_updater.h

Issue 127053004: [cc] Unify static create method of ResourceUpdate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_ 5 #ifndef CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_
6 #define CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_ 6 #define CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_
7 7
8 #include "cc/resources/content_layer_updater.h" 8 #include "cc/resources/content_layer_updater.h"
9 #include "third_party/skia/include/core/SkPicture.h" 9 #include "third_party/skia/include/core/SkPicture.h"
10 10
11 class SkCanvas; 11 class SkCanvas;
12 12
13 namespace cc { 13 namespace cc {
14 14
15 class LayerPainter; 15 class LayerPainter;
16 16
17 // This class records the content_rect into an SkPicture. Subclasses, provide 17 // This class records the content_rect into an SkPicture. Subclass provides
enne (OOO) 2014/01/08 17:51:45 This looks unrelated to your change description.
simonhong 2014/01/09 04:36:25 Removed and sent out another cl.
18 // different implementations of tile updating based on this recorded picture. 18 // SkCanvas to DrawPicture() for tile updating based on this recorded picture.
19 // The BitmapSkPictureContentLayerUpdater and
20 // FrameBufferSkPictureContentLayerUpdater are two examples of such
21 // implementations.
22 class SkPictureContentLayerUpdater : public ContentLayerUpdater { 19 class SkPictureContentLayerUpdater : public ContentLayerUpdater {
23 protected: 20 protected:
24 SkPictureContentLayerUpdater( 21 SkPictureContentLayerUpdater(
25 scoped_ptr<LayerPainter> painter, 22 scoped_ptr<LayerPainter> painter,
26 RenderingStatsInstrumentation* stats_instrumentation, 23 RenderingStatsInstrumentation* stats_instrumentation,
27 int layer_id); 24 int layer_id);
28 virtual ~SkPictureContentLayerUpdater(); 25 virtual ~SkPictureContentLayerUpdater();
29 26
30 virtual void PrepareToUpdate(gfx::Rect content_rect, 27 virtual void PrepareToUpdate(gfx::Rect content_rect,
31 gfx::Size tile_size, 28 gfx::Size tile_size,
32 float contents_width_scale, 29 float contents_width_scale,
33 float contents_height_scale, 30 float contents_height_scale,
34 gfx::Rect* resulting_opaque_rect) OVERRIDE; 31 gfx::Rect* resulting_opaque_rect) OVERRIDE;
35 void DrawPicture(SkCanvas* canvas); 32 void DrawPicture(SkCanvas* canvas);
36 33
37 private: 34 private:
38 // Recording canvas. 35 // Recording canvas.
39 SkPicture picture_; 36 SkPicture picture_;
40 37
41 DISALLOW_COPY_AND_ASSIGN(SkPictureContentLayerUpdater); 38 DISALLOW_COPY_AND_ASSIGN(SkPictureContentLayerUpdater);
42 }; 39 };
43 40
44 } // namespace cc 41 } // namespace cc
45 42
46 #endif // CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_ 43 #endif // CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_
OLDNEW
« cc/resources/resource_update.h ('K') | « cc/resources/resource_update.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698