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

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

Issue 889063002: (not for commit) Create 2nd ContextProvider for Ganesh rasterization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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
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,
14 bool flipped_output_surface) 15 bool flipped_output_surface)
15 : OutputSurface(context_provider), external_stencil_test_(false) { 16 : OutputSurface(context_provider, worker_context_provider),
17 external_stencil_test_(false) {
16 capabilities_.flipped_output_surface = flipped_output_surface; 18 capabilities_.flipped_output_surface = flipped_output_surface;
17 } 19 }
18 20
19 PixelTestOutputSurface::PixelTestOutputSurface( 21 PixelTestOutputSurface::PixelTestOutputSurface(
20 scoped_ptr<SoftwareOutputDevice> software_device) 22 scoped_ptr<SoftwareOutputDevice> software_device)
21 : OutputSurface(software_device.Pass()), external_stencil_test_(false) {} 23 : OutputSurface(software_device.Pass()), external_stencil_test_(false) {}
22 24
23 void PixelTestOutputSurface::Reshape(const gfx::Size& size, 25 void PixelTestOutputSurface::Reshape(const gfx::Size& size,
24 float scale_factor) { 26 float scale_factor) {
25 gfx::Size expanded_size(size.width() + surface_expansion_size_.width(), 27 gfx::Size expanded_size(size.width() + surface_expansion_size_.width(),
26 size.height() + surface_expansion_size_.height()); 28 size.height() + surface_expansion_size_.height());
27 OutputSurface::Reshape(expanded_size, scale_factor); 29 OutputSurface::Reshape(expanded_size, scale_factor);
28 } 30 }
29 31
30 bool PixelTestOutputSurface::HasExternalStencilTest() const { 32 bool PixelTestOutputSurface::HasExternalStencilTest() const {
31 return external_stencil_test_; 33 return external_stencil_test_;
32 } 34 }
33 35
34 void PixelTestOutputSurface::SwapBuffers(CompositorFrame* frame) { 36 void PixelTestOutputSurface::SwapBuffers(CompositorFrame* frame) {
35 PostSwapBuffersComplete(); 37 PostSwapBuffersComplete();
36 client_->DidSwapBuffers(); 38 client_->DidSwapBuffers();
37 } 39 }
38 40
39 } // namespace cc 41 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/pixel_test_output_surface.h ('k') | content/browser/compositor/browser_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698