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

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

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/shader_unittest.cc ('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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 #endif 216 #endif
217 } 217 }
218 } 218 }
219 219
220 void SoftwareRenderer::SetDrawViewport( 220 void SoftwareRenderer::SetDrawViewport(
221 const gfx::Rect& window_space_viewport) {} 221 const gfx::Rect& window_space_viewport) {}
222 222
223 bool SoftwareRenderer::IsSoftwareResource( 223 bool SoftwareRenderer::IsSoftwareResource(
224 ResourceProvider::ResourceId resource_id) const { 224 ResourceProvider::ResourceId resource_id) const {
225 switch (resource_provider_->GetResourceType(resource_id)) { 225 switch (resource_provider_->GetResourceType(resource_id)) {
226 case ResourceProvider::RESOURCE_TYPE_GL_TEXTURE: 226 case ResourceProvider::GLTexture:
227 return false; 227 return false;
228 case ResourceProvider::RESOURCE_TYPE_BITMAP: 228 case ResourceProvider::Bitmap:
229 return true; 229 return true;
230 case ResourceProvider::RESOURCE_TYPE_INVALID: 230 case ResourceProvider::InvalidType:
231 break; 231 break;
232 } 232 }
233 233
234 LOG(FATAL) << "Invalid resource type."; 234 LOG(FATAL) << "Invalid resource type.";
235 return false; 235 return false;
236 } 236 }
237 237
238 void SoftwareRenderer::DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) { 238 void SoftwareRenderer::DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) {
239 TRACE_EVENT0("cc", "SoftwareRenderer::DoDrawQuad"); 239 TRACE_EVENT0("cc", "SoftwareRenderer::DoDrawQuad");
240 gfx::Transform quad_rect_matrix; 240 gfx::Transform quad_rect_matrix;
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 } 612 }
613 613
614 void SoftwareRenderer::DidChangeVisibility() { 614 void SoftwareRenderer::DidChangeVisibility() {
615 if (visible()) 615 if (visible())
616 EnsureBackbuffer(); 616 EnsureBackbuffer();
617 else 617 else
618 DiscardBackbuffer(); 618 DiscardBackbuffer();
619 } 619 }
620 620
621 } // namespace cc 621 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/shader_unittest.cc ('k') | cc/output/software_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698