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

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

Issue 1387283002: cc: Remove redundant is_overlay arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo changes on overlay_strategy_single_on_top.cc Created 5 years, 2 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
« no previous file with comments | « cc/quads/stream_video_draw_quad.cc ('k') | cc/quads/texture_draw_quad.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 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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/quads/draw_quad.h" 10 #include "cc/quads/draw_quad.h"
(...skipping 18 matching lines...) Expand all
29 bool y_flipped, 29 bool y_flipped,
30 bool nearest_neighbor); 30 bool nearest_neighbor);
31 31
32 void SetAll(const SharedQuadState* shared_quad_state, 32 void SetAll(const SharedQuadState* shared_quad_state,
33 const gfx::Rect& rect, 33 const gfx::Rect& rect,
34 const gfx::Rect& opaque_rect, 34 const gfx::Rect& opaque_rect,
35 const gfx::Rect& visible_rect, 35 const gfx::Rect& visible_rect,
36 bool needs_blending, 36 bool needs_blending,
37 unsigned resource_id, 37 unsigned resource_id,
38 gfx::Size resource_size_in_pixels, 38 gfx::Size resource_size_in_pixels,
39 bool allow_overlay,
40 bool premultiplied_alpha, 39 bool premultiplied_alpha,
41 const gfx::PointF& uv_top_left, 40 const gfx::PointF& uv_top_left,
42 const gfx::PointF& uv_bottom_right, 41 const gfx::PointF& uv_bottom_right,
43 SkColor background_color, 42 SkColor background_color,
44 const float vertex_opacity[4], 43 const float vertex_opacity[4],
45 bool y_flipped, 44 bool y_flipped,
46 bool nearest_neighbor); 45 bool nearest_neighbor);
47 46
48 bool premultiplied_alpha; 47 bool premultiplied_alpha;
49 gfx::PointF uv_top_left; 48 gfx::PointF uv_top_left;
50 gfx::PointF uv_bottom_right; 49 gfx::PointF uv_bottom_right;
51 SkColor background_color; 50 SkColor background_color;
52 float vertex_opacity[4]; 51 float vertex_opacity[4];
53 bool y_flipped; 52 bool y_flipped;
54 bool nearest_neighbor; 53 bool nearest_neighbor;
55 54
56 struct OverlayResources { 55 struct OverlayResources {
57 OverlayResources(); 56 OverlayResources();
58 57
59 gfx::Size size_in_pixels[Resources::kMaxResourceIdCount]; 58 gfx::Size size_in_pixels[Resources::kMaxResourceIdCount];
60 bool allow_overlay[Resources::kMaxResourceIdCount];
61 }; 59 };
62 OverlayResources overlay_resources; 60 OverlayResources overlay_resources;
63 61
64 ResourceId resource_id() const { return resources.ids[kResourceIdIndex]; } 62 ResourceId resource_id() const { return resources.ids[kResourceIdIndex]; }
65 const gfx::Size& resource_size_in_pixels() const { 63 const gfx::Size& resource_size_in_pixels() const {
66 return overlay_resources.size_in_pixels[kResourceIdIndex]; 64 return overlay_resources.size_in_pixels[kResourceIdIndex];
67 } 65 }
68 void set_resource_size_in_pixels(const gfx::Size& size_in_pixels) { 66 void set_resource_size_in_pixels(const gfx::Size& size_in_pixels) {
69 overlay_resources.size_in_pixels[kResourceIdIndex] = size_in_pixels; 67 overlay_resources.size_in_pixels[kResourceIdIndex] = size_in_pixels;
70 } 68 }
71 bool allow_overlay() const {
72 return overlay_resources.allow_overlay[kResourceIdIndex];
73 }
74 void set_allow_overlay(bool allow_overlay) {
75 overlay_resources.allow_overlay[kResourceIdIndex] = allow_overlay;
76 }
77 69
78 static const TextureDrawQuad* MaterialCast(const DrawQuad*); 70 static const TextureDrawQuad* MaterialCast(const DrawQuad*);
79 71
80 private: 72 private:
81 static const size_t kResourceIdIndex = 0; 73 static const size_t kResourceIdIndex = 0;
82 74
83 void ExtendValue(base::trace_event::TracedValue* value) const override; 75 void ExtendValue(base::trace_event::TracedValue* value) const override;
84 }; 76 };
85 77
86 } // namespace cc 78 } // namespace cc
87 79
88 #endif // CC_QUADS_TEXTURE_DRAW_QUAD_H_ 80 #endif // CC_QUADS_TEXTURE_DRAW_QUAD_H_
OLDNEW
« no previous file with comments | « cc/quads/stream_video_draw_quad.cc ('k') | cc/quads/texture_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698