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

Side by Side Diff: ui/compositor/paint_cache.h

Issue 1494223003: cc: Shrink size of display item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix some compilation issues in ui oops Created 5 years 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 | « ui/compositor/compositing_recorder.cc ('k') | ui/compositor/paint_cache.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 UI_COMPOSITOR_PAINT_CACHE_H_ 5 #ifndef UI_COMPOSITOR_PAINT_CACHE_H_
6 #define UI_COMPOSITOR_PAINT_CACHE_H_ 6 #define UI_COMPOSITOR_PAINT_CACHE_H_
7 7
8 #include "cc/playback/drawing_display_item.h" 8 #include "cc/playback/drawing_display_item.h"
9 #include "ui/compositor/compositor_export.h" 9 #include "ui/compositor/compositor_export.h"
10 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
(...skipping 12 matching lines...) Expand all
23 // Returns true if the PaintCache was able to insert a previously-saved 23 // Returns true if the PaintCache was able to insert a previously-saved
24 // painting output into the PaintContext. If it returns false, the caller 24 // painting output into the PaintContext. If it returns false, the caller
25 // needs to do the work of painting, which can be stored into the PaintCache 25 // needs to do the work of painting, which can be stored into the PaintCache
26 // to be used next time. 26 // to be used next time.
27 bool UseCache(const PaintContext& context, const gfx::Size& size_in_context); 27 bool UseCache(const PaintContext& context, const gfx::Size& size_in_context);
28 28
29 private: 29 private:
30 // Only PaintRecorder can modify these. 30 // Only PaintRecorder can modify these.
31 friend PaintRecorder; 31 friend PaintRecorder;
32 32
33 void SetCache(const cc::DrawingDisplayItem* item); 33 void SetCache(const cc::DrawingDisplayItem& item);
34 34
35 bool has_cache_; 35 bool has_cache_;
36 cc::DrawingDisplayItem display_item_; 36 cc::DrawingDisplayItem display_item_;
37 37
38 DISALLOW_COPY_AND_ASSIGN(PaintCache); 38 DISALLOW_COPY_AND_ASSIGN(PaintCache);
39 }; 39 };
40 40
41 } // namespace ui 41 } // namespace ui
42 42
43 #endif // UI_COMPOSITOR_PAINT_CACHE_H_ 43 #endif // UI_COMPOSITOR_PAINT_CACHE_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositing_recorder.cc ('k') | ui/compositor/paint_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698