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

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: 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 10 matching lines...) Expand all
21 virtual ~RenderPassDrawQuad(); 21 virtual ~RenderPassDrawQuad();
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 RenderPass::Id render_pass_id, 25 RenderPass::Id render_pass_id,
26 bool is_replica, 26 bool is_replica,
27 ResourceProvider::ResourceId mask_resource_id, 27 ResourceProvider::ResourceId mask_resource_id,
28 const gfx::Rect& contents_changed_since_last_frame, 28 const gfx::Rect& contents_changed_since_last_frame,
29 const gfx::RectF& mask_uv_rect, 29 const gfx::RectF& mask_uv_rect,
30 const FilterOperations& filters, 30 const FilterOperations& filters,
31 const FilterOperations& background_filters); 31 const FilterOperations& background_filters,
32 const gfx::Transform& scale);
32 33
33 void SetAll(const SharedQuadState* shared_quad_state, 34 void SetAll(const SharedQuadState* shared_quad_state,
34 const gfx::Rect& rect, 35 const gfx::Rect& rect,
35 const gfx::Rect& opaque_rect, 36 const gfx::Rect& opaque_rect,
36 const gfx::Rect& visible_rect, 37 const gfx::Rect& visible_rect,
37 bool needs_blending, 38 bool needs_blending,
38 RenderPass::Id render_pass_id, 39 RenderPass::Id render_pass_id,
39 bool is_replica, 40 bool is_replica,
40 ResourceProvider::ResourceId mask_resource_id, 41 ResourceProvider::ResourceId mask_resource_id,
41 const gfx::Rect& contents_changed_since_last_frame, 42 const gfx::Rect& contents_changed_since_last_frame,
42 const gfx::RectF& mask_uv_rect, 43 const gfx::RectF& mask_uv_rect,
43 const FilterOperations& filters, 44 const FilterOperations& filters,
44 const FilterOperations& background_filters); 45 const FilterOperations& background_filters,
46 const gfx::Transform& scale);
45 47
46 scoped_ptr<RenderPassDrawQuad> Copy( 48 scoped_ptr<RenderPassDrawQuad> Copy(
47 const SharedQuadState* copied_shared_quad_state, 49 const SharedQuadState* copied_shared_quad_state,
48 RenderPass::Id copied_render_pass_id) const; 50 RenderPass::Id copied_render_pass_id) const;
49 51
50 RenderPass::Id render_pass_id; 52 RenderPass::Id render_pass_id;
51 bool is_replica; 53 bool is_replica;
52 ResourceProvider::ResourceId mask_resource_id; 54 ResourceProvider::ResourceId mask_resource_id;
53 gfx::Rect contents_changed_since_last_frame; 55 gfx::Rect contents_changed_since_last_frame;
54 gfx::RectF mask_uv_rect; 56 gfx::RectF mask_uv_rect;
55 57
56 // Post-processing filters, applied to the pixels in the render pass' texture. 58 // Post-processing filters, applied to the pixels in the render pass' texture.
57 FilterOperations filters; 59 FilterOperations filters;
58 60
59 // Post-processing filters, applied to the pixels showing through the 61 // Post-processing filters, applied to the pixels showing through the
60 // background of the render pass, from behind it. 62 // background of the render pass, from behind it.
61 FilterOperations background_filters; 63 FilterOperations background_filters;
64 gfx::Transform scale;
danakj 2014/03/07 17:35:44 Since you only care about the scale components, yo
Stephen White 2014/03/07 17:46:43 Yeah, that's probably a better idea.
danakj 2014/03/07 17:49:23 Oh actually, because this is a transform from the
danakj 2014/03/07 17:50:22 This is the full computation of the transform: htt
Stephen White 2014/03/07 20:45:58 Done.
Stephen White 2014/03/07 20:45:58 Done.
62 65
63 virtual void IterateResources(const ResourceIteratorCallback& callback) 66 virtual void IterateResources(const ResourceIteratorCallback& callback)
64 OVERRIDE; 67 OVERRIDE;
65 68
66 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*); 69 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*);
67 70
68 private: 71 private:
69 RenderPassDrawQuad(); 72 RenderPassDrawQuad();
70 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE; 73 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE;
71 }; 74 };
72 75
73 } // namespace cc 76 } // namespace cc
74 77
75 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_ 78 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698