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

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

Issue 1380653003: Mac Overlays: Allow SolidColor and Tile quads to be candidates for overlays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@AllOrNothing2
Patch Set: Created 5 years, 2 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/output/gl_renderer.cc ('k') | cc/output/overlay_candidate.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/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 2104 matching lines...) Expand 10 before | Expand all | Expand 10 after
2115 class SingleOverlayOnTopProcessor : public OverlayProcessor { 2115 class SingleOverlayOnTopProcessor : public OverlayProcessor {
2116 public: 2116 public:
2117 class SingleOverlayValidator : public OverlayCandidateValidator { 2117 class SingleOverlayValidator : public OverlayCandidateValidator {
2118 public: 2118 public:
2119 void GetStrategies(OverlayProcessor::StrategyList* strategies) override { 2119 void GetStrategies(OverlayProcessor::StrategyList* strategies) override {
2120 strategies->push_back( 2120 strategies->push_back(
2121 make_scoped_ptr(new OverlayStrategySingleOnTop(this))); 2121 make_scoped_ptr(new OverlayStrategySingleOnTop(this)));
2122 strategies->push_back(make_scoped_ptr(new OverlayStrategyUnderlay(this))); 2122 strategies->push_back(make_scoped_ptr(new OverlayStrategyUnderlay(this)));
2123 } 2123 }
2124 2124
2125 bool IsSupportedQuad(const DrawQuad* quad) override { return true; }
2126
2125 void CheckOverlaySupport(OverlayCandidateList* surfaces) override { 2127 void CheckOverlaySupport(OverlayCandidateList* surfaces) override {
2126 ASSERT_EQ(1U, surfaces->size()); 2128 ASSERT_EQ(1U, surfaces->size());
2127 OverlayCandidate& candidate = surfaces->back(); 2129 OverlayCandidate& candidate = surfaces->back();
2128 candidate.overlay_handled = true; 2130 candidate.overlay_handled = true;
2129 } 2131 }
2130 }; 2132 };
2131 2133
2132 explicit SingleOverlayOnTopProcessor(OutputSurface* surface) 2134 explicit SingleOverlayOnTopProcessor(OutputSurface* surface)
2133 : OverlayProcessor(surface) {} 2135 : OverlayProcessor(surface) {}
2134 2136
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 EXPECT_CALL(overlay_scheduler, 2227 EXPECT_CALL(overlay_scheduler,
2226 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, 2228 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect,
2227 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); 2229 BoundingRect(uv_top_left, uv_bottom_right))).Times(1);
2228 2230
2229 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, 2231 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect,
2230 viewport_rect, false); 2232 viewport_rect, false);
2231 } 2233 }
2232 2234
2233 } // namespace 2235 } // namespace
2234 } // namespace cc 2236 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/overlay_candidate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698