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

Side by Side Diff: cc/test/pixel_test_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/pixel_test_output_surface.h ('k') | cc/test/scheduler_test_common.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/pixel_test_output_surface.h" 5 #include "cc/test/pixel_test_output_surface.h"
6 6
7 #include "cc/output/output_surface_client.h" 7 #include "cc/output/output_surface_client.h"
8 #include "ui/gfx/transform.h" 8 #include "ui/gfx/transform.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 PixelTestOutputSurface::PixelTestOutputSurface( 12 PixelTestOutputSurface::PixelTestOutputSurface(
13 scoped_refptr<ContextProvider> context_provider, 13 scoped_refptr<ContextProvider> context_provider,
14 scoped_refptr<ContextProvider> worker_context_provider,
15 bool flipped_output_surface)
16 : OutputSurface(context_provider, worker_context_provider),
17 external_stencil_test_(false) {
18 capabilities_.flipped_output_surface = flipped_output_surface;
19 }
20
21 PixelTestOutputSurface::PixelTestOutputSurface(
22 scoped_refptr<ContextProvider> context_provider,
14 bool flipped_output_surface) 23 bool flipped_output_surface)
15 : OutputSurface(context_provider), external_stencil_test_(false) { 24 : PixelTestOutputSurface(context_provider,
16 capabilities_.flipped_output_surface = flipped_output_surface; 25 nullptr,
26 flipped_output_surface) {
17 } 27 }
18 28
19 PixelTestOutputSurface::PixelTestOutputSurface( 29 PixelTestOutputSurface::PixelTestOutputSurface(
20 scoped_ptr<SoftwareOutputDevice> software_device) 30 scoped_ptr<SoftwareOutputDevice> software_device)
21 : OutputSurface(software_device.Pass()), external_stencil_test_(false) {} 31 : OutputSurface(software_device.Pass()), external_stencil_test_(false) {
32 }
22 33
23 void PixelTestOutputSurface::Reshape(const gfx::Size& size, 34 void PixelTestOutputSurface::Reshape(const gfx::Size& size,
24 float scale_factor) { 35 float scale_factor) {
25 gfx::Size expanded_size(size.width() + surface_expansion_size_.width(), 36 gfx::Size expanded_size(size.width() + surface_expansion_size_.width(),
26 size.height() + surface_expansion_size_.height()); 37 size.height() + surface_expansion_size_.height());
27 OutputSurface::Reshape(expanded_size, scale_factor); 38 OutputSurface::Reshape(expanded_size, scale_factor);
28 } 39 }
29 40
30 bool PixelTestOutputSurface::HasExternalStencilTest() const { 41 bool PixelTestOutputSurface::HasExternalStencilTest() const {
31 return external_stencil_test_; 42 return external_stencil_test_;
32 } 43 }
33 44
34 void PixelTestOutputSurface::SwapBuffers(CompositorFrame* frame) { 45 void PixelTestOutputSurface::SwapBuffers(CompositorFrame* frame) {
35 PostSwapBuffersComplete(); 46 PostSwapBuffersComplete();
36 client_->DidSwapBuffers(); 47 client_->DidSwapBuffers();
37 } 48 }
38 49
39 } // namespace cc 50 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/pixel_test_output_surface.h ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698