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

Side by Side Diff: cc/paint/discardable_image_store.h

Issue 2857923004: cc: Keep PaintImage in DrawImage. (Closed)
Patch Set: dependent branch Created 3 years, 7 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
« no previous file with comments | « no previous file | cc/paint/discardable_image_store.cc » ('j') | cc/paint/discardable_image_store.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_PAINT_DISCARDABLE_IMAGE_STORE_H_ 5 #ifndef CC_PAINT_DISCARDABLE_IMAGE_STORE_H_
6 #define CC_PAINT_DISCARDABLE_IMAGE_STORE_H_ 6 #define CC_PAINT_DISCARDABLE_IMAGE_STORE_H_
7 7
8 #include "base/containers/flat_map.h" 8 #include "base/containers/flat_map.h"
9 #include "cc/paint/draw_image.h" 9 #include "cc/paint/draw_image.h"
10 #include "cc/paint/image_id.h" 10 #include "cc/paint/image_id.h"
(...skipping 15 matching lines...) Expand all
26 base::flat_map<ImageId, gfx::Rect>* image_id_to_rect); 26 base::flat_map<ImageId, gfx::Rect>* image_id_to_rect);
27 ~DiscardableImageStore(); 27 ~DiscardableImageStore();
28 28
29 void GatherDiscardableImages(const PaintOpBuffer* buffer); 29 void GatherDiscardableImages(const PaintOpBuffer* buffer);
30 SkCanvas* NoDrawCanvas(); 30 SkCanvas* NoDrawCanvas();
31 31
32 private: 32 private:
33 class PaintTrackingCanvas; 33 class PaintTrackingCanvas;
34 34
35 void AddImageFromFlags(const SkRect& rect, const PaintFlags& flags); 35 void AddImageFromFlags(const SkRect& rect, const PaintFlags& flags);
36 void AddImage(const PaintImage& paint_image, 36 void AddImage(PaintImage paint_image,
37 const SkRect& src_rect, 37 const SkRect& src_rect,
38 const SkRect& rect, 38 const SkRect& rect,
39 const SkMatrix* local_matrix, 39 const SkMatrix* local_matrix,
40 const PaintFlags& flags); 40 const PaintFlags& flags);
41 41
42 // This canvas is used only for tracking transform/clip/filter state from the 42 // This canvas is used only for tracking transform/clip/filter state from the
43 // non-drawing ops. 43 // non-drawing ops.
44 std::unique_ptr<PaintTrackingCanvas> canvas_; 44 std::unique_ptr<PaintTrackingCanvas> canvas_;
45 std::vector<std::pair<DrawImage, gfx::Rect>>* image_set_; 45 std::vector<std::pair<DrawImage, gfx::Rect>>* image_set_;
46 base::flat_map<ImageId, gfx::Rect>* image_id_to_rect_; 46 base::flat_map<ImageId, gfx::Rect>* image_id_to_rect_;
47 }; 47 };
48 48
49 } // namespace cc 49 } // namespace cc
50 50
51 #endif // CC_PAINT_DISCARDABLE_IMAGE_STORE_H_ 51 #endif // CC_PAINT_DISCARDABLE_IMAGE_STORE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/paint/discardable_image_store.cc » ('j') | cc/paint/discardable_image_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698