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

Side by Side Diff: cc/output/software_renderer_unittest.cc

Issue 23171014: Fix UpdateTilePriorities viewport in Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add tests 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
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/output/software_renderer.h" 5 #include "cc/output/software_renderer.h"
6 6
7 #include "cc/layers/quad_sink.h" 7 #include "cc/layers/quad_sink.h"
8 #include "cc/output/compositor_frame_metadata.h" 8 #include "cc/output/compositor_frame_metadata.h"
9 #include "cc/output/software_output_device.h" 9 #include "cc/output/software_output_device.h"
10 #include "cc/quads/render_pass.h" 10 #include "cc/quads/render_pass.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 void set_should_clear_root_render_pass(bool clear_root_render_pass) { 53 void set_should_clear_root_render_pass(bool clear_root_render_pass) {
54 should_clear_root_render_pass_ = clear_root_render_pass; 54 should_clear_root_render_pass_ = clear_root_render_pass;
55 } 55 }
56 56
57 // RendererClient implementation. 57 // RendererClient implementation.
58 virtual gfx::Rect DeviceViewport() const OVERRIDE { 58 virtual gfx::Rect DeviceViewport() const OVERRIDE {
59 return viewport_; 59 return viewport_;
60 } 60 }
61 virtual gfx::Rect DeviceClip() const OVERRIDE {
62 return DeviceViewport();
63 }
61 virtual float DeviceScaleFactor() const OVERRIDE { 64 virtual float DeviceScaleFactor() const OVERRIDE {
62 return 1.f; 65 return 1.f;
63 } 66 }
64 virtual const LayerTreeSettings& Settings() const OVERRIDE { 67 virtual const LayerTreeSettings& Settings() const OVERRIDE {
65 return settings_; 68 return settings_;
66 } 69 }
67 virtual void SetFullRootLayerDamage() OVERRIDE {} 70 virtual void SetFullRootLayerDamage() OVERRIDE {}
68 virtual bool HasImplThread() const OVERRIDE { return false; } 71 virtual bool HasImplThread() const OVERRIDE { return false; }
69 virtual bool ShouldClearRootRenderPass() const OVERRIDE { 72 virtual bool ShouldClearRootRenderPass() const OVERRIDE {
70 return should_clear_root_render_pass_; 73 return should_clear_root_render_pass_;
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 EXPECT_EQ( 404 EXPECT_EQ(
402 SK_ColorMAGENTA, 405 SK_ColorMAGENTA,
403 output.getColor(interior_visible_rect.x(), interior_visible_rect.y())); 406 output.getColor(interior_visible_rect.x(), interior_visible_rect.y()));
404 EXPECT_EQ(SK_ColorMAGENTA, 407 EXPECT_EQ(SK_ColorMAGENTA,
405 output.getColor(interior_visible_rect.right() - 1, 408 output.getColor(interior_visible_rect.right() - 1,
406 interior_visible_rect.bottom() - 1)); 409 interior_visible_rect.bottom() - 1));
407 } 410 }
408 411
409 } // namespace 412 } // namespace
410 } // namespace cc 413 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698