| OLD | NEW |
| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "cc/base/cc_export.h" | 12 #include "cc/base/cc_export.h" |
| 13 #include "cc/output/filter_operations.h" | 13 #include "cc/output/filter_operations.h" |
| 14 #include "cc/quads/draw_quad.h" | 14 #include "cc/quads/draw_quad.h" |
| 15 #include "cc/quads/render_pass_id.h" | 15 #include "cc/quads/render_pass_id.h" |
| 16 #include "cc/resources/resource_provider.h" | 16 #include "cc/resources/resource_provider.h" |
| 17 | 17 |
| 18 namespace cc { | 18 namespace cc { |
| 19 | 19 |
| 20 class CC_EXPORT RenderPassDrawQuad : public DrawQuad { | 20 class CC_EXPORT RenderPassDrawQuad : public DrawQuad { |
| 21 public: | 21 public: |
| 22 static const size_t kMaskResourceIdIndex = 0; |
| 23 |
| 22 RenderPassDrawQuad(); | 24 RenderPassDrawQuad(); |
| 23 RenderPassDrawQuad(const RenderPassDrawQuad& other); | 25 RenderPassDrawQuad(const RenderPassDrawQuad& other); |
| 24 ~RenderPassDrawQuad() override; | 26 ~RenderPassDrawQuad() override; |
| 25 | 27 |
| 26 void SetNew(const SharedQuadState* shared_quad_state, | 28 void SetNew(const SharedQuadState* shared_quad_state, |
| 27 const gfx::Rect& rect, | 29 const gfx::Rect& rect, |
| 28 const gfx::Rect& visible_rect, | 30 const gfx::Rect& visible_rect, |
| 29 RenderPassId render_pass_id, | 31 RenderPassId render_pass_id, |
| 30 ResourceId mask_resource_id, | 32 ResourceId mask_resource_id, |
| 31 const gfx::Vector2dF& mask_uv_scale, | 33 const gfx::Vector2dF& mask_uv_scale, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // Helper function to generate the normalized uv rect. | 69 // Helper function to generate the normalized uv rect. |
| 68 gfx::RectF MaskUVRect() const; | 70 gfx::RectF MaskUVRect() const; |
| 69 | 71 |
| 70 ResourceId mask_resource_id() const { | 72 ResourceId mask_resource_id() const { |
| 71 return resources.ids[kMaskResourceIdIndex]; | 73 return resources.ids[kMaskResourceIdIndex]; |
| 72 } | 74 } |
| 73 | 75 |
| 74 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*); | 76 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*); |
| 75 | 77 |
| 76 private: | 78 private: |
| 77 static const size_t kMaskResourceIdIndex = 0; | |
| 78 | |
| 79 void ExtendValue(base::trace_event::TracedValue* value) const override; | 79 void ExtendValue(base::trace_event::TracedValue* value) const override; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace cc | 82 } // namespace cc |
| 83 | 83 |
| 84 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_ | 84 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_ |
| OLD | NEW |