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

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

Issue 191123002: Implement hidpi and pinch-zoom scaling of filter params in cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch Transform -> Vector2dF for scale, add DCHECK Created 6 years, 9 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 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_DRAW_QUAD_H_ 5 #ifndef CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
6 #define CC_QUADS_RENDER_PASS_DRAW_QUAD_H_ 6 #define CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 11 matching lines...) Expand all
22 22
23 void SetNew(const SharedQuadState* shared_quad_state, 23 void SetNew(const SharedQuadState* shared_quad_state,
24 const gfx::Rect& rect, 24 const gfx::Rect& rect,
25 const gfx::Rect& visible_rect, 25 const gfx::Rect& visible_rect,
26 RenderPass::Id render_pass_id, 26 RenderPass::Id render_pass_id,
27 bool is_replica, 27 bool is_replica,
28 ResourceProvider::ResourceId mask_resource_id, 28 ResourceProvider::ResourceId mask_resource_id,
29 const gfx::Rect& contents_changed_since_last_frame, 29 const gfx::Rect& contents_changed_since_last_frame,
30 const gfx::RectF& mask_uv_rect, 30 const gfx::RectF& mask_uv_rect,
31 const FilterOperations& filters, 31 const FilterOperations& filters,
32 const FilterOperations& background_filters); 32 const FilterOperations& background_filters,
33 const gfx::Vector2dF& scale);
33 34
34 void SetAll(const SharedQuadState* shared_quad_state, 35 void SetAll(const SharedQuadState* shared_quad_state,
35 const gfx::Rect& rect, 36 const gfx::Rect& rect,
36 const gfx::Rect& opaque_rect, 37 const gfx::Rect& opaque_rect,
37 const gfx::Rect& visible_rect, 38 const gfx::Rect& visible_rect,
38 bool needs_blending, 39 bool needs_blending,
39 RenderPass::Id render_pass_id, 40 RenderPass::Id render_pass_id,
40 bool is_replica, 41 bool is_replica,
41 ResourceProvider::ResourceId mask_resource_id, 42 ResourceProvider::ResourceId mask_resource_id,
42 const gfx::Rect& contents_changed_since_last_frame, 43 const gfx::Rect& contents_changed_since_last_frame,
43 const gfx::RectF& mask_uv_rect, 44 const gfx::RectF& mask_uv_rect,
44 const FilterOperations& filters, 45 const FilterOperations& filters,
45 const FilterOperations& background_filters); 46 const FilterOperations& background_filters,
47 const gfx::Vector2dF& scale);
46 48
47 scoped_ptr<RenderPassDrawQuad> Copy( 49 scoped_ptr<RenderPassDrawQuad> Copy(
48 const SharedQuadState* copied_shared_quad_state, 50 const SharedQuadState* copied_shared_quad_state,
49 RenderPass::Id copied_render_pass_id) const; 51 RenderPass::Id copied_render_pass_id) const;
50 52
51 RenderPass::Id render_pass_id; 53 RenderPass::Id render_pass_id;
52 bool is_replica; 54 bool is_replica;
53 ResourceProvider::ResourceId mask_resource_id; 55 ResourceProvider::ResourceId mask_resource_id;
54 gfx::Rect contents_changed_since_last_frame; 56 gfx::Rect contents_changed_since_last_frame;
55 gfx::RectF mask_uv_rect; 57 gfx::RectF mask_uv_rect;
56 58
57 // Post-processing filters, applied to the pixels in the render pass' texture. 59 // Post-processing filters, applied to the pixels in the render pass' texture.
58 FilterOperations filters; 60 FilterOperations filters;
59 61
60 // Post-processing filters, applied to the pixels showing through the 62 // Post-processing filters, applied to the pixels showing through the
61 // background of the render pass, from behind it. 63 // background of the render pass, from behind it.
62 FilterOperations background_filters; 64 FilterOperations background_filters;
65 gfx::Vector2dF scale;
danakj 2014/03/07 20:54:05 How about calling it |filters_scale|, move it up b
Stephen White 2014/03/07 21:54:14 Done.
63 66
64 virtual void IterateResources(const ResourceIteratorCallback& callback) 67 virtual void IterateResources(const ResourceIteratorCallback& callback)
65 OVERRIDE; 68 OVERRIDE;
66 69
67 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*); 70 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*);
68 71
69 private: 72 private:
70 RenderPassDrawQuad(); 73 RenderPassDrawQuad();
71 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE; 74 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE;
72 }; 75 };
73 76
74 } // namespace cc 77 } // namespace cc
75 78
76 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_ 79 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698