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

Side by Side Diff: cc/test/mock_quad_culler.h

Issue 308193003: Removed QuadSink and MockQuadCuller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plumLayerImpl
Patch Set: rm unused line Created 6 years, 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_TEST_MOCK_QUAD_CULLER_H_
6 #define CC_TEST_MOCK_QUAD_CULLER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/layers/quad_sink.h"
10 #include "cc/quads/draw_quad.h"
11 #include "cc/quads/render_pass.h"
12 #include "cc/test/mock_occlusion_tracker.h"
13
14 namespace cc {
15 class LayerImpl;
16
17 class MockQuadCuller : public QuadSink {
18 public:
19 virtual ~MockQuadCuller();
20
21 MockQuadCuller(RenderPass* render_pass,
22 MockOcclusionTracker<LayerImpl>* occlusion_tracker);
23
24 virtual gfx::Rect UnoccludedContentRect(
25 const LayerImpl* layer,
26 const gfx::Rect& content_rect,
27 const gfx::Transform& draw_transform) OVERRIDE;
28
29 virtual gfx::Rect UnoccludedContributingSurfaceContentRect(
30 const LayerImpl* layer,
31 const gfx::Rect& content_rect,
32 const gfx::Transform& draw_transform) OVERRIDE;
33
34 const QuadList& quad_list() const { return render_pass_->quad_list; }
35 const SharedQuadStateList& shared_quad_state_list() const {
36 return render_pass_->shared_quad_state_list;
37 }
38
39 void set_occluded_target_rect(const gfx::Rect& occluded) {
40 occlusion_tracker_->set_occluded_target_rect(occluded);
41 }
42
43 void set_occluded_target_rect_for_contributing_surface(
44 const gfx::Rect& occluded) {
45 occlusion_tracker_->set_occluded_target_rect_for_contributing_surface(
46 occluded);
47 }
48
49 void clear_lists() {
50 render_pass_->quad_list.clear();
51 render_pass_->shared_quad_state_list.clear();
52 }
53
54 private:
55 MockOcclusionTracker<LayerImpl>* occlusion_tracker_;
56 };
57
58 } // namespace cc
59
60 #endif // CC_TEST_MOCK_QUAD_CULLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698