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

Side by Side Diff: cc/quads/render_pass.h

Issue 15435003: cc: Add CopyAsBitmapRequest class to hold the readback callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nolint Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/quads/render_pass.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_QUADS_RENDER_PASS_H_ 5 #ifndef CC_QUADS_RENDER_PASS_H_
6 #define CC_QUADS_RENDER_PASS_H_ 6 #define CC_QUADS_RENDER_PASS_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector>
10 9
11 #include "base/basictypes.h" 10 #include "base/basictypes.h"
12 #include "base/callback.h" 11 #include "base/callback.h"
13 #include "base/hash_tables.h" 12 #include "base/hash_tables.h"
14 #include "cc/base/cc_export.h" 13 #include "cc/base/cc_export.h"
15 #include "cc/base/hash_pair.h" 14 #include "cc/base/hash_pair.h"
16 #include "cc/base/scoped_ptr_hash_map.h" 15 #include "cc/base/scoped_ptr_hash_map.h"
17 #include "cc/base/scoped_ptr_vector.h" 16 #include "cc/base/scoped_ptr_vector.h"
18 #include "skia/ext/refptr.h" 17 #include "skia/ext/refptr.h"
19 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h" 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h"
20 #include "third_party/skia/include/core/SkColor.h" 19 #include "third_party/skia/include/core/SkColor.h"
21 #include "third_party/skia/include/core/SkImageFilter.h" 20 #include "third_party/skia/include/core/SkImageFilter.h"
22 #include "ui/gfx/rect.h" 21 #include "ui/gfx/rect.h"
23 #include "ui/gfx/rect_f.h" 22 #include "ui/gfx/rect_f.h"
24 #include "ui/gfx/transform.h" 23 #include "ui/gfx/transform.h"
25 24
26 namespace cc { 25 namespace cc {
27 26
28 class DrawQuad; 27 class DrawQuad;
28 class CopyOutputRequest;
29 class SharedQuadState; 29 class SharedQuadState;
30 30
31 // A list of DrawQuad objects, sorted internally in front-to-back order. 31 // A list of DrawQuad objects, sorted internally in front-to-back order.
32 class QuadList : public ScopedPtrVector<DrawQuad> { 32 class QuadList : public ScopedPtrVector<DrawQuad> {
33 public: 33 public:
34 typedef reverse_iterator BackToFrontIterator; 34 typedef reverse_iterator BackToFrontIterator;
35 typedef const_reverse_iterator ConstBackToFrontIterator; 35 typedef const_reverse_iterator ConstBackToFrontIterator;
36 36
37 inline BackToFrontIterator BackToFrontBegin() { return rbegin(); } 37 inline BackToFrontIterator BackToFrontBegin() { return rbegin(); }
38 inline BackToFrontIterator BackToFrontEnd() { return rend(); } 38 inline BackToFrontIterator BackToFrontEnd() { return rend(); }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 bool has_transparent_background; 96 bool has_transparent_background;
97 97
98 // If true, then there may be pixels in the render pass' texture that are not 98 // If true, then there may be pixels in the render pass' texture that are not
99 // complete, since they are occluded. 99 // complete, since they are occluded.
100 bool has_occlusion_from_outside_target_surface; 100 bool has_occlusion_from_outside_target_surface;
101 101
102 // If non-empty, the renderer should produce a copy of the render pass' 102 // If non-empty, the renderer should produce a copy of the render pass'
103 // contents as a bitmap, and give a copy of the bitmap to each callback in 103 // contents as a bitmap, and give a copy of the bitmap to each callback in
104 // this list. This property should not be serialized between compositors, as 104 // this list. This property should not be serialized between compositors, as
105 // it only makes sense in the root compositor. 105 // it only makes sense in the root compositor.
106 typedef base::Callback<void(scoped_ptr<SkBitmap>)> 106 ScopedPtrVector<CopyOutputRequest> copy_requests;
107 RequestCopyAsBitmapCallback;
108 std::vector<RequestCopyAsBitmapCallback> copy_callbacks;
109 107
110 QuadList quad_list; 108 QuadList quad_list;
111 SharedQuadStateList shared_quad_state_list; 109 SharedQuadStateList shared_quad_state_list;
112 110
113 protected: 111 protected:
114 RenderPass(); 112 RenderPass();
115 113
116 DISALLOW_COPY_AND_ASSIGN(RenderPass); 114 DISALLOW_COPY_AND_ASSIGN(RenderPass);
117 }; 115 };
118 116
(...skipping 18 matching lines...) Expand all
137 #error define a hash function for your compiler 135 #error define a hash function for your compiler
138 #endif // COMPILER 136 #endif // COMPILER
139 } 137 }
140 138
141 namespace cc { 139 namespace cc {
142 typedef ScopedPtrVector<RenderPass> RenderPassList; 140 typedef ScopedPtrVector<RenderPass> RenderPassList;
143 typedef base::hash_map<RenderPass::Id, RenderPass*> RenderPassIdHashMap; 141 typedef base::hash_map<RenderPass::Id, RenderPass*> RenderPassIdHashMap;
144 } // namespace cc 142 } // namespace cc
145 143
146 #endif // CC_QUADS_RENDER_PASS_H_ 144 #endif // CC_QUADS_RENDER_PASS_H_
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/quads/render_pass.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698