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

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

Issue 1144523003: Rename cc::ResourceProvider::ResourceId to cc::ResourceId and move it to its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/render_pass_draw_quad.h ('k') | cc/resources/prioritized_resource.h » ('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 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 #include "cc/quads/render_pass_draw_quad.h" 5 #include "cc/quads/render_pass_draw_quad.h"
6 6
7 #include "base/trace_event/trace_event_argument.h" 7 #include "base/trace_event/trace_event_argument.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/debug/traced_value.h" 10 #include "cc/debug/traced_value.h"
11 #include "third_party/skia/include/core/SkImageFilter.h" 11 #include "third_party/skia/include/core/SkImageFilter.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 RenderPassDrawQuad::RenderPassDrawQuad() 15 RenderPassDrawQuad::RenderPassDrawQuad()
16 : render_pass_id(RenderPassId(-1, -1)), 16 : render_pass_id(RenderPassId(-1, -1)),
17 mask_resource_id(static_cast<ResourceProvider::ResourceId>(-1)) { 17 mask_resource_id(static_cast<ResourceId>(-1)) {
18 } 18 }
19 19
20 RenderPassDrawQuad::~RenderPassDrawQuad() { 20 RenderPassDrawQuad::~RenderPassDrawQuad() {
21 } 21 }
22 22
23 void RenderPassDrawQuad::SetNew(const SharedQuadState* shared_quad_state, 23 void RenderPassDrawQuad::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 RenderPassId render_pass_id, 26 RenderPassId render_pass_id,
27 ResourceProvider::ResourceId mask_resource_id, 27 ResourceId mask_resource_id,
28 const gfx::Vector2dF& mask_uv_scale, 28 const gfx::Vector2dF& mask_uv_scale,
29 const gfx::Size& mask_texture_size, 29 const gfx::Size& mask_texture_size,
30 const FilterOperations& filters, 30 const FilterOperations& filters,
31 const gfx::Vector2dF& filters_scale, 31 const gfx::Vector2dF& filters_scale,
32 const FilterOperations& background_filters) { 32 const FilterOperations& background_filters) {
33 DCHECK_GT(render_pass_id.layer_id, 0); 33 DCHECK_GT(render_pass_id.layer_id, 0);
34 DCHECK_GE(render_pass_id.index, 0); 34 DCHECK_GE(render_pass_id.index, 0);
35 35
36 gfx::Rect opaque_rect; 36 gfx::Rect opaque_rect;
37 bool needs_blending = false; 37 bool needs_blending = false;
(...skipping 10 matching lines...) Expand all
48 filters_scale, 48 filters_scale,
49 background_filters); 49 background_filters);
50 } 50 }
51 51
52 void RenderPassDrawQuad::SetAll(const SharedQuadState* shared_quad_state, 52 void RenderPassDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
53 const gfx::Rect& rect, 53 const gfx::Rect& rect,
54 const gfx::Rect& opaque_rect, 54 const gfx::Rect& opaque_rect,
55 const gfx::Rect& visible_rect, 55 const gfx::Rect& visible_rect,
56 bool needs_blending, 56 bool needs_blending,
57 RenderPassId render_pass_id, 57 RenderPassId render_pass_id,
58 ResourceProvider::ResourceId mask_resource_id, 58 ResourceId mask_resource_id,
59 const gfx::Vector2dF& mask_uv_scale, 59 const gfx::Vector2dF& mask_uv_scale,
60 const gfx::Size& mask_texture_size, 60 const gfx::Size& mask_texture_size,
61 const FilterOperations& filters, 61 const FilterOperations& filters,
62 const gfx::Vector2dF& filters_scale, 62 const gfx::Vector2dF& filters_scale,
63 const FilterOperations& background_filters) { 63 const FilterOperations& background_filters) {
64 DCHECK_GT(render_pass_id.layer_id, 0); 64 DCHECK_GT(render_pass_id.layer_id, 0);
65 DCHECK_GE(render_pass_id.index, 0); 65 DCHECK_GE(render_pass_id.index, 0);
66 66
67 DrawQuad::SetAll(shared_quad_state, DrawQuad::RENDER_PASS, rect, opaque_rect, 67 DrawQuad::SetAll(shared_quad_state, DrawQuad::RENDER_PASS, rect, opaque_rect,
68 visible_rect, needs_blending); 68 visible_rect, needs_blending);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 filters.AsValueInto(value); 106 filters.AsValueInto(value);
107 value->EndDictionary(); 107 value->EndDictionary();
108 MathUtil::AddToTracedValue("filters_scale", filters_scale, value); 108 MathUtil::AddToTracedValue("filters_scale", filters_scale, value);
109 109
110 value->BeginDictionary("background_filters"); 110 value->BeginDictionary("background_filters");
111 background_filters.AsValueInto(value); 111 background_filters.AsValueInto(value);
112 value->EndDictionary(); 112 value->EndDictionary();
113 } 113 }
114 114
115 } // namespace cc 115 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/render_pass_draw_quad.h ('k') | cc/resources/prioritized_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698