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

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

Issue 15579002: Implement transform/clip support for Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Turn on fuzzy comparator for new SoftwareRenderer tests Created 7 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
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_TEST_FAKE_OUTPUT_SURFACE_H_ 5 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_
6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_ 6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 bool needs_begin_frame() const { 74 bool needs_begin_frame() const {
75 return needs_begin_frame_; 75 return needs_begin_frame_;
76 } 76 }
77 void BeginFrame(base::TimeTicks frame_time); 77 void BeginFrame(base::TimeTicks frame_time);
78 78
79 void set_forced_draw_to_software_device(bool forced) { 79 void set_forced_draw_to_software_device(bool forced) {
80 forced_draw_to_software_device_ = forced; 80 forced_draw_to_software_device_ = forced;
81 } 81 }
82 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; 82 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE;
83 83
84 private: 84 protected:
85 FakeOutputSurface( 85 FakeOutputSurface(
86 scoped_ptr<WebKit::WebGraphicsContext3D> context3d, 86 scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
87 bool has_parent); 87 bool has_parent);
88 88
89 FakeOutputSurface( 89 FakeOutputSurface(
90 scoped_ptr<SoftwareOutputDevice> software_device, 90 scoped_ptr<SoftwareOutputDevice> software_device,
91 bool has_parent); 91 bool has_parent);
92 92
93 void SendFrameAck(); 93 void SendFrameAck();
94 94
95 CompositorFrame last_sent_frame_; 95 CompositorFrame last_sent_frame_;
96 size_t num_sent_frames_; 96 size_t num_sent_frames_;
97 bool needs_begin_frame_; 97 bool needs_begin_frame_;
98 bool forced_draw_to_software_device_; 98 bool forced_draw_to_software_device_;
99 base::WeakPtrFactory<FakeOutputSurface> weak_ptr_factory_; 99 base::WeakPtrFactory<FakeOutputSurface> weak_ptr_factory_;
100 }; 100 };
101 101
102 static inline scoped_ptr<cc::OutputSurface> CreateFakeOutputSurface() { 102 static inline scoped_ptr<cc::OutputSurface> CreateFakeOutputSurface() {
103 return FakeOutputSurface::Create3d( 103 return FakeOutputSurface::Create3d(
104 TestWebGraphicsContext3D::Create( 104 TestWebGraphicsContext3D::Create(
105 WebKit::WebGraphicsContext3D::Attributes()) 105 WebKit::WebGraphicsContext3D::Attributes())
106 .PassAs<WebKit::WebGraphicsContext3D>()).PassAs<cc::OutputSurface>(); 106 .PassAs<WebKit::WebGraphicsContext3D>()).PassAs<cc::OutputSurface>();
107 } 107 }
108 108
109 } // namespace cc 109 } // namespace cc
110 110
111 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ 111 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698