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

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

Issue 23961003: cc: Remove most methods from RendererClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rendererclient: rebase Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/pixel_test_output_surface.h ('k') | cc/trees/layer_tree_host_impl.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(
13 scoped_refptr<ContextProvider> context_provider)
14 : OutputSurface(context_provider), external_stencil_test_(false) {}
15
16 PixelTestOutputSurface::PixelTestOutputSurface(
17 scoped_ptr<cc::SoftwareOutputDevice> software_device)
18 : OutputSurface(software_device.Pass()), external_stencil_test_(false) {}
19
12 void PixelTestOutputSurface::Reshape(gfx::Size size, float scale_factor) { 20 void PixelTestOutputSurface::Reshape(gfx::Size size, float scale_factor) {
13 gfx::Size expanded_size(size.width() + surface_expansion_size_.width(), 21 gfx::Size expanded_size(size.width() + surface_expansion_size_.width(),
14 size.height() + surface_expansion_size_.height()); 22 size.height() + surface_expansion_size_.height());
15 OutputSurface::Reshape(expanded_size, scale_factor); 23 OutputSurface::Reshape(expanded_size, scale_factor);
16 24
17 gfx::Rect offset_viewport = gfx::Rect(size) + viewport_offset_; 25 gfx::Rect offset_viewport = gfx::Rect(size) + viewport_offset_;
18 gfx::Rect offset_clip = device_clip_.IsEmpty() 26 gfx::Rect offset_clip = device_clip_.IsEmpty()
19 ? offset_viewport 27 ? offset_viewport
20 : device_clip_ + viewport_offset_; 28 : device_clip_ + viewport_offset_;
21 SetExternalDrawConstraints( 29 SetExternalDrawConstraints(
22 gfx::Transform(), offset_viewport, offset_clip, true); 30 gfx::Transform(), offset_viewport, offset_clip, true);
23 } 31 }
24 32
33 bool PixelTestOutputSurface::HasExternalStencilTest() const {
34 return external_stencil_test_;
35 }
36
25 } // namespace cc 37 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/pixel_test_output_surface.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698