| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_TEXTURE_DRAW_QUAD_H_ | 5 #ifndef CC_QUADS_TEXTURE_DRAW_QUAD_H_ |
| 6 #define CC_QUADS_TEXTURE_DRAW_QUAD_H_ | 6 #define CC_QUADS_TEXTURE_DRAW_QUAD_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 const gfx::Rect& rect, | 24 const gfx::Rect& rect, |
| 25 const gfx::Rect& opaque_rect, | 25 const gfx::Rect& opaque_rect, |
| 26 const gfx::Rect& visible_rect, | 26 const gfx::Rect& visible_rect, |
| 27 unsigned resource_id, | 27 unsigned resource_id, |
| 28 bool premultiplied_alpha, | 28 bool premultiplied_alpha, |
| 29 const gfx::PointF& uv_top_left, | 29 const gfx::PointF& uv_top_left, |
| 30 const gfx::PointF& uv_bottom_right, | 30 const gfx::PointF& uv_bottom_right, |
| 31 SkColor background_color, | 31 SkColor background_color, |
| 32 const float vertex_opacity[4], | 32 const float vertex_opacity[4], |
| 33 bool y_flipped, | 33 bool y_flipped, |
| 34 bool nearest_neighbor); | 34 bool nearest_neighbor, |
| 35 bool secure_output_only); |
| 35 | 36 |
| 36 void SetAll(const SharedQuadState* shared_quad_state, | 37 void SetAll(const SharedQuadState* shared_quad_state, |
| 37 const gfx::Rect& rect, | 38 const gfx::Rect& rect, |
| 38 const gfx::Rect& opaque_rect, | 39 const gfx::Rect& opaque_rect, |
| 39 const gfx::Rect& visible_rect, | 40 const gfx::Rect& visible_rect, |
| 40 bool needs_blending, | 41 bool needs_blending, |
| 41 unsigned resource_id, | 42 unsigned resource_id, |
| 42 gfx::Size resource_size_in_pixels, | 43 gfx::Size resource_size_in_pixels, |
| 43 bool premultiplied_alpha, | 44 bool premultiplied_alpha, |
| 44 const gfx::PointF& uv_top_left, | 45 const gfx::PointF& uv_top_left, |
| 45 const gfx::PointF& uv_bottom_right, | 46 const gfx::PointF& uv_bottom_right, |
| 46 SkColor background_color, | 47 SkColor background_color, |
| 47 const float vertex_opacity[4], | 48 const float vertex_opacity[4], |
| 48 bool y_flipped, | 49 bool y_flipped, |
| 49 bool nearest_neighbor); | 50 bool nearest_neighbor, |
| 51 bool secure_output_only); |
| 50 | 52 |
| 51 bool premultiplied_alpha; | 53 bool premultiplied_alpha; |
| 52 gfx::PointF uv_top_left; | 54 gfx::PointF uv_top_left; |
| 53 gfx::PointF uv_bottom_right; | 55 gfx::PointF uv_bottom_right; |
| 54 SkColor background_color; | 56 SkColor background_color; |
| 55 float vertex_opacity[4]; | 57 float vertex_opacity[4]; |
| 56 bool y_flipped; | 58 bool y_flipped; |
| 57 bool nearest_neighbor; | 59 bool nearest_neighbor; |
| 60 bool secure_output_only = false; |
| 58 | 61 |
| 59 struct OverlayResources { | 62 struct OverlayResources { |
| 60 OverlayResources(); | 63 OverlayResources(); |
| 61 | 64 |
| 62 gfx::Size size_in_pixels[Resources::kMaxResourceIdCount]; | 65 gfx::Size size_in_pixels[Resources::kMaxResourceIdCount]; |
| 63 }; | 66 }; |
| 64 OverlayResources overlay_resources; | 67 OverlayResources overlay_resources; |
| 65 | 68 |
| 66 ResourceId resource_id() const { return resources.ids[kResourceIdIndex]; } | 69 ResourceId resource_id() const { return resources.ids[kResourceIdIndex]; } |
| 67 const gfx::Size& resource_size_in_pixels() const { | 70 const gfx::Size& resource_size_in_pixels() const { |
| 68 return overlay_resources.size_in_pixels[kResourceIdIndex]; | 71 return overlay_resources.size_in_pixels[kResourceIdIndex]; |
| 69 } | 72 } |
| 70 void set_resource_size_in_pixels(const gfx::Size& size_in_pixels) { | 73 void set_resource_size_in_pixels(const gfx::Size& size_in_pixels) { |
| 71 overlay_resources.size_in_pixels[kResourceIdIndex] = size_in_pixels; | 74 overlay_resources.size_in_pixels[kResourceIdIndex] = size_in_pixels; |
| 72 } | 75 } |
| 73 | 76 |
| 74 static const TextureDrawQuad* MaterialCast(const DrawQuad*); | 77 static const TextureDrawQuad* MaterialCast(const DrawQuad*); |
| 75 | 78 |
| 76 private: | 79 private: |
| 77 static const size_t kResourceIdIndex = 0; | 80 static const size_t kResourceIdIndex = 0; |
| 78 | 81 |
| 79 void ExtendValue(base::trace_event::TracedValue* value) const override; | 82 void ExtendValue(base::trace_event::TracedValue* value) const override; |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 } // namespace cc | 85 } // namespace cc |
| 83 | 86 |
| 84 #endif // CC_QUADS_TEXTURE_DRAW_QUAD_H_ | 87 #endif // CC_QUADS_TEXTURE_DRAW_QUAD_H_ |
| OLD | NEW |