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

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

Issue 1418273002: cc: Move draw params from SetExternalDrawConstraints to OnDraw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests fixed Created 5 years, 1 month 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/output/output_surface.h" 5 #include "cc/output/output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 void OutputSurface::DidLoseOutputSurface() { 174 void OutputSurface::DidLoseOutputSurface() {
175 TRACE_EVENT0("cc", "OutputSurface::DidLoseOutputSurface"); 175 TRACE_EVENT0("cc", "OutputSurface::DidLoseOutputSurface");
176 client_->DidLoseOutputSurface(); 176 client_->DidLoseOutputSurface();
177 } 177 }
178 178
179 void OutputSurface::SetExternalStencilTest(bool enabled) { 179 void OutputSurface::SetExternalStencilTest(bool enabled) {
180 external_stencil_test_enabled_ = enabled; 180 external_stencil_test_enabled_ = enabled;
181 } 181 }
182 182
183 void OutputSurface::SetExternalDrawConstraints(
184 const gfx::Transform& transform,
185 const gfx::Rect& viewport,
186 const gfx::Rect& clip,
187 const gfx::Rect& viewport_rect_for_tile_priority,
188 const gfx::Transform& transform_for_tile_priority,
189 bool resourceless_software_draw) {
190 client_->SetExternalDrawConstraints(transform,
191 viewport,
192 clip,
193 viewport_rect_for_tile_priority,
194 transform_for_tile_priority,
195 resourceless_software_draw);
196 }
197
198 OutputSurface::~OutputSurface() { 183 OutputSurface::~OutputSurface() {
199 if (client_) 184 if (client_)
200 DetachFromClientInternal(); 185 DetachFromClientInternal();
201 } 186 }
202 187
203 bool OutputSurface::HasExternalStencilTest() const { 188 bool OutputSurface::HasExternalStencilTest() const {
204 return external_stencil_test_enabled_; 189 return external_stencil_test_enabled_;
205 } 190 }
206 191
207 bool OutputSurface::BindToClient(OutputSurfaceClient* client) { 192 bool OutputSurface::BindToClient(OutputSurfaceClient* client) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 if (context_provider_.get()) { 348 if (context_provider_.get()) {
364 context_provider_->SetLostContextCallback( 349 context_provider_->SetLostContextCallback(
365 ContextProvider::LostContextCallback()); 350 ContextProvider::LostContextCallback());
366 } 351 }
367 context_provider_ = nullptr; 352 context_provider_ = nullptr;
368 client_ = nullptr; 353 client_ = nullptr;
369 weak_ptr_factory_.InvalidateWeakPtrs(); 354 weak_ptr_factory_.InvalidateWeakPtrs();
370 } 355 }
371 356
372 } // namespace cc 357 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698