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

Side by Side Diff: cc/surfaces/surface_factory.cc

Issue 2167713002: cc: Delete SurfaceDrawStatus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Scott's comments Created 4 years, 5 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/surfaces/surface_factory.h ('k') | cc/surfaces/surface_factory_unittest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/surfaces/surface_factory.h" 5 #include "cc/surfaces/surface_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void SurfaceFactory::SubmitCompositorFrame(const SurfaceId& surface_id, 69 void SurfaceFactory::SubmitCompositorFrame(const SurfaceId& surface_id,
70 CompositorFrame frame, 70 CompositorFrame frame,
71 const DrawCallback& callback) { 71 const DrawCallback& callback) {
72 TRACE_EVENT0("cc", "SurfaceFactory::SubmitCompositorFrame"); 72 TRACE_EVENT0("cc", "SurfaceFactory::SubmitCompositorFrame");
73 OwningSurfaceMap::iterator it = surface_map_.find(surface_id); 73 OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
74 DCHECK(it != surface_map_.end()); 74 DCHECK(it != surface_map_.end());
75 DCHECK(it->second->factory().get() == this); 75 DCHECK(it->second->factory().get() == this);
76 it->second->QueueFrame(std::move(frame), callback); 76 it->second->QueueFrame(std::move(frame), callback);
77 if (!manager_->SurfaceModified(surface_id)) { 77 if (!manager_->SurfaceModified(surface_id)) {
78 TRACE_EVENT_INSTANT0("cc", "Damage not visible.", TRACE_EVENT_SCOPE_THREAD); 78 TRACE_EVENT_INSTANT0("cc", "Damage not visible.", TRACE_EVENT_SCOPE_THREAD);
79 it->second->RunDrawCallbacks(SurfaceDrawStatus::DRAW_SKIPPED); 79 it->second->RunDrawCallbacks();
80 } 80 }
81 } 81 }
82 82
83 void SurfaceFactory::RequestCopyOfSurface( 83 void SurfaceFactory::RequestCopyOfSurface(
84 const SurfaceId& surface_id, 84 const SurfaceId& surface_id,
85 std::unique_ptr<CopyOutputRequest> copy_request) { 85 std::unique_ptr<CopyOutputRequest> copy_request) {
86 OwningSurfaceMap::iterator it = surface_map_.find(surface_id); 86 OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
87 if (it == surface_map_.end()) { 87 if (it == surface_map_.end()) {
88 copy_request->SendEmptyResult(); 88 copy_request->SendEmptyResult();
89 return; 89 return;
(...skipping 15 matching lines...) Expand all
105 105
106 void SurfaceFactory::RefResources(const TransferableResourceArray& resources) { 106 void SurfaceFactory::RefResources(const TransferableResourceArray& resources) {
107 holder_.RefResources(resources); 107 holder_.RefResources(resources);
108 } 108 }
109 109
110 void SurfaceFactory::UnrefResources(const ReturnedResourceArray& resources) { 110 void SurfaceFactory::UnrefResources(const ReturnedResourceArray& resources) {
111 holder_.UnrefResources(resources); 111 holder_.UnrefResources(resources);
112 } 112 }
113 113
114 } // namespace cc 114 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_factory.h ('k') | cc/surfaces/surface_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698