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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/test/fake_output_surface.h ('k') | cc/test/fake_painted_scrollbar_layer.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 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 #include "cc/test/fake_output_surface.h" 5 #include "cc/test/fake_output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "cc/output/compositor_frame_ack.h" 9 #include "cc/output/compositor_frame_ack.h"
10 #include "cc/output/output_surface_client.h" 10 #include "cc/output/output_surface_client.h"
11 #include "cc/resources/returned_resource.h" 11 #include "cc/resources/returned_resource.h"
12 #include "cc/test/begin_frame_args_test.h" 12 #include "cc/test/begin_frame_args_test.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 FakeOutputSurface::FakeOutputSurface( 17 FakeOutputSurface::FakeOutputSurface(
18 scoped_refptr<ContextProvider> context_provider, 18 scoped_refptr<ContextProvider> context_provider,
19 scoped_refptr<ContextProvider> worker_context_provider,
20 bool delegated_rendering)
21 : OutputSurface(context_provider, worker_context_provider),
22 client_(NULL),
23 num_sent_frames_(0),
24 has_external_stencil_test_(false),
25 framebuffer_(0) {
26 if (delegated_rendering) {
27 capabilities_.delegated_rendering = true;
28 capabilities_.max_frames_pending = 1;
29 }
30 }
31
32 FakeOutputSurface::FakeOutputSurface(
33 scoped_refptr<ContextProvider> context_provider,
19 bool delegated_rendering) 34 bool delegated_rendering)
20 : OutputSurface(context_provider), 35 : OutputSurface(context_provider),
21 client_(NULL), 36 client_(NULL),
22 num_sent_frames_(0), 37 num_sent_frames_(0),
23 has_external_stencil_test_(false), 38 has_external_stencil_test_(false),
24 framebuffer_(0) { 39 framebuffer_(0) {
25 if (delegated_rendering) { 40 if (delegated_rendering) {
26 capabilities_.delegated_rendering = true; 41 capabilities_.delegated_rendering = true;
27 capabilities_.max_frames_pending = 1; 42 capabilities_.max_frames_pending = 1;
28 } 43 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 bool FakeOutputSurface::HasExternalStencilTest() const { 139 bool FakeOutputSurface::HasExternalStencilTest() const {
125 return has_external_stencil_test_; 140 return has_external_stencil_test_;
126 } 141 }
127 142
128 void FakeOutputSurface::SetMemoryPolicyToSetAtBind( 143 void FakeOutputSurface::SetMemoryPolicyToSetAtBind(
129 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) { 144 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) {
130 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind); 145 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind);
131 } 146 }
132 147
133 } // namespace cc 148 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/fake_painted_scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698