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

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

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/quads/picture_draw_quad.cc ('k') | cc/resources/bitmap_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 CC_RESOURCES_BITMAP_CONTENT_LAYER_UPDATER_H_ 5 #ifndef CC_RESOURCES_BITMAP_CONTENT_LAYER_UPDATER_H_
6 #define CC_RESOURCES_BITMAP_CONTENT_LAYER_UPDATER_H_ 6 #define CC_RESOURCES_BITMAP_CONTENT_LAYER_UPDATER_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/resources/content_layer_updater.h" 9 #include "cc/resources/content_layer_updater.h"
10 #include "skia/ext/refptr.h" 10 #include "skia/ext/refptr.h"
(...skipping 24 matching lines...) Expand all
35 bool partial_update) override; 35 bool partial_update) override;
36 36
37 private: 37 private:
38 BitmapContentLayerUpdater* updater_; 38 BitmapContentLayerUpdater* updater_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(Resource); 40 DISALLOW_COPY_AND_ASSIGN(Resource);
41 }; 41 };
42 42
43 static scoped_refptr<BitmapContentLayerUpdater> Create( 43 static scoped_refptr<BitmapContentLayerUpdater> Create(
44 scoped_ptr<LayerPainter> painter, 44 scoped_ptr<LayerPainter> painter,
45 RenderingStatsInstrumentation* stats_instrumenation,
46 int layer_id); 45 int layer_id);
47 46
48 scoped_ptr<LayerUpdater::Resource> CreateResource( 47 scoped_ptr<LayerUpdater::Resource> CreateResource(
49 PrioritizedResourceManager* manager) override; 48 PrioritizedResourceManager* manager) override;
50 void PrepareToUpdate(const gfx::Size& content_size, 49 void PrepareToUpdate(const gfx::Size& content_size,
51 const gfx::Rect& paint_rect, 50 const gfx::Rect& paint_rect,
52 const gfx::Size& tile_size, 51 const gfx::Size& tile_size,
53 float contents_width_scale, 52 float contents_width_scale,
54 float contents_height_scale) override; 53 float contents_height_scale) override;
55 void UpdateTexture(ResourceUpdateQueue* queue, 54 void UpdateTexture(ResourceUpdateQueue* queue,
56 PrioritizedResource* resource, 55 PrioritizedResource* resource,
57 const gfx::Rect& source_rect, 56 const gfx::Rect& source_rect,
58 const gfx::Vector2d& dest_offset, 57 const gfx::Vector2d& dest_offset,
59 bool partial_update); 58 bool partial_update);
60 void SetOpaque(bool opaque) override; 59 void SetOpaque(bool opaque) override;
61 void ReduceMemoryUsage() override; 60 void ReduceMemoryUsage() override;
62 61
63 protected: 62 protected:
64 BitmapContentLayerUpdater( 63 BitmapContentLayerUpdater(
65 scoped_ptr<LayerPainter> painter, 64 scoped_ptr<LayerPainter> painter,
66 RenderingStatsInstrumentation* stats_instrumenation,
67 int layer_id); 65 int layer_id);
68 ~BitmapContentLayerUpdater() override; 66 ~BitmapContentLayerUpdater() override;
69 67
70 SkBitmap bitmap_backing_; 68 SkBitmap bitmap_backing_;
71 skia::RefPtr<SkCanvas> canvas_; 69 skia::RefPtr<SkCanvas> canvas_;
72 gfx::Size canvas_size_; 70 gfx::Size canvas_size_;
73 71
74 private: 72 private:
75 DISALLOW_COPY_AND_ASSIGN(BitmapContentLayerUpdater); 73 DISALLOW_COPY_AND_ASSIGN(BitmapContentLayerUpdater);
76 }; 74 };
77 75
78 } // namespace cc 76 } // namespace cc
79 77
80 #endif // CC_RESOURCES_BITMAP_CONTENT_LAYER_UPDATER_H_ 78 #endif // CC_RESOURCES_BITMAP_CONTENT_LAYER_UPDATER_H_
OLDNEW
« no previous file with comments | « cc/quads/picture_draw_quad.cc ('k') | cc/resources/bitmap_content_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698