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

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

Issue 1144523003: Rename cc::ResourceProvider::ResourceId to cc::ResourceId and move it to its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/software_renderer.h ('k') | cc/output/software_renderer_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 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 "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_ack.h" 10 #include "cc/output/compositor_frame_ack.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 EnsureScissorTestDisabled(); 222 EnsureScissorTestDisabled();
223 ClearFramebuffer(frame); 223 ClearFramebuffer(frame);
224 break; 224 break;
225 case SURFACE_INITIALIZATION_MODE_SCISSORED_CLEAR: 225 case SURFACE_INITIALIZATION_MODE_SCISSORED_CLEAR:
226 SetScissorTestRect(render_pass_scissor); 226 SetScissorTestRect(render_pass_scissor);
227 ClearFramebuffer(frame); 227 ClearFramebuffer(frame);
228 break; 228 break;
229 } 229 }
230 } 230 }
231 231
232 bool SoftwareRenderer::IsSoftwareResource( 232 bool SoftwareRenderer::IsSoftwareResource(ResourceId resource_id) const {
233 ResourceProvider::ResourceId resource_id) const {
234 switch (resource_provider_->GetResourceType(resource_id)) { 233 switch (resource_provider_->GetResourceType(resource_id)) {
235 case ResourceProvider::RESOURCE_TYPE_GL_TEXTURE: 234 case ResourceProvider::RESOURCE_TYPE_GL_TEXTURE:
236 return false; 235 return false;
237 case ResourceProvider::RESOURCE_TYPE_BITMAP: 236 case ResourceProvider::RESOURCE_TYPE_BITMAP:
238 return true; 237 return true;
239 } 238 }
240 239
241 LOG(FATAL) << "Invalid resource type."; 240 LOG(FATAL) << "Invalid resource type.";
242 return false; 241 return false;
243 } 242 }
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 } 650 }
652 651
653 void SoftwareRenderer::DidChangeVisibility() { 652 void SoftwareRenderer::DidChangeVisibility() {
654 if (visible()) 653 if (visible())
655 EnsureBackbuffer(); 654 EnsureBackbuffer();
656 else 655 else
657 DiscardBackbuffer(); 656 DiscardBackbuffer();
658 } 657 }
659 658
660 } // namespace cc 659 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer.h ('k') | cc/output/software_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698