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

Side by Side Diff: cc/render_pass.cc

Issue 11308153: Migrate most of cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 8 years 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
« no previous file with comments | « cc/render_pass.h ('k') | cc/render_pass_unittest.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 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/render_pass.h" 5 #include "cc/render_pass.h"
6 6
7 #include "third_party/skia/include/core/SkImageFilter.h" 7 #include "third_party/skia/include/core/SkImageFilter.h"
8 8
9 using WebKit::WebTransformationMatrix;
10
11 namespace cc { 9 namespace cc {
12 10
13 scoped_ptr<RenderPass> RenderPass::Create() { 11 scoped_ptr<RenderPass> RenderPass::Create() {
14 return make_scoped_ptr(new RenderPass); 12 return make_scoped_ptr(new RenderPass);
15 } 13 }
16 14
17 RenderPass::RenderPass() 15 RenderPass::RenderPass()
18 : id(Id(-1, -1)), 16 : id(Id(-1, -1)),
19 has_transparent_background(true), 17 has_transparent_background(true),
20 has_occlusion_from_outside_target_surface(false), 18 has_occlusion_from_outside_target_surface(false),
(...skipping 16 matching lines...) Expand all
37 has_occlusion_from_outside_target_surface, 35 has_occlusion_from_outside_target_surface,
38 filters, 36 filters,
39 filter, 37 filter,
40 background_filters); 38 background_filters);
41 return copy_pass.Pass(); 39 return copy_pass.Pass();
42 } 40 }
43 41
44 void RenderPass::SetNew(Id id, 42 void RenderPass::SetNew(Id id,
45 gfx::Rect output_rect, 43 gfx::Rect output_rect,
46 gfx::RectF damage_rect, 44 gfx::RectF damage_rect,
47 const WebKit::WebTransformationMatrix& transform_to_root _target) { 45 const gfx::Transform& transform_to_root_target) {
48 DCHECK_GT(id.layer_id, 0); 46 DCHECK_GT(id.layer_id, 0);
49 DCHECK_GE(id.index, 0); 47 DCHECK_GE(id.index, 0);
50 48
51 this->id = id; 49 this->id = id;
52 this->output_rect = output_rect; 50 this->output_rect = output_rect;
53 this->damage_rect = damage_rect; 51 this->damage_rect = damage_rect;
54 this->transform_to_root_target = transform_to_root_target; 52 this->transform_to_root_target = transform_to_root_target;
55 53
56 DCHECK(quad_list.isEmpty()); 54 DCHECK(quad_list.isEmpty());
57 DCHECK(shared_quad_state_list.isEmpty()); 55 DCHECK(shared_quad_state_list.isEmpty());
58 } 56 }
59 57
60 void RenderPass::SetAll(Id id, 58 void RenderPass::SetAll(Id id,
61 gfx::Rect output_rect, 59 gfx::Rect output_rect,
62 gfx::RectF damage_rect, 60 gfx::RectF damage_rect,
63 const WebKit::WebTransformationMatrix& transform_to_root _target, 61 const gfx::Transform& transform_to_root_target,
64 bool has_transparent_background, 62 bool has_transparent_background,
65 bool has_occlusion_from_outside_target_surface, 63 bool has_occlusion_from_outside_target_surface,
66 const WebKit::WebFilterOperations& filters, 64 const WebKit::WebFilterOperations& filters,
67 SkImageFilter* filter, 65 SkImageFilter* filter,
68 const WebKit::WebFilterOperations& background_filters) { 66 const WebKit::WebFilterOperations& background_filters) {
69 DCHECK_GT(id.layer_id, 0); 67 DCHECK_GT(id.layer_id, 0);
70 DCHECK_GE(id.index, 0); 68 DCHECK_GE(id.index, 0);
71 69
72 this->id = id; 70 this->id = id;
73 this->output_rect = output_rect; 71 this->output_rect = output_rect;
74 this->damage_rect = damage_rect; 72 this->damage_rect = damage_rect;
75 this->transform_to_root_target = transform_to_root_target; 73 this->transform_to_root_target = transform_to_root_target;
76 this->has_transparent_background = has_transparent_background; 74 this->has_transparent_background = has_transparent_background;
77 this->has_occlusion_from_outside_target_surface = 75 this->has_occlusion_from_outside_target_surface =
78 has_occlusion_from_outside_target_surface; 76 has_occlusion_from_outside_target_surface;
79 this->filters = filters; 77 this->filters = filters;
80 SkRefCnt_SafeAssign(this->filter, filter); 78 SkRefCnt_SafeAssign(this->filter, filter);
81 this->background_filters = background_filters; 79 this->background_filters = background_filters;
82 80
83 DCHECK(quad_list.isEmpty()); 81 DCHECK(quad_list.isEmpty());
84 DCHECK(shared_quad_state_list.isEmpty()); 82 DCHECK(shared_quad_state_list.isEmpty());
85 } 83 }
86 84
87 } // namespace cc 85 } // namespace cc
OLDNEW
« no previous file with comments | « cc/render_pass.h ('k') | cc/render_pass_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698