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

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

Issue 2282433002: Revert of cc: Delete all the RendererCapabilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-prepare-mailbox-param
Patch Set: Created 4 years, 3 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/vulkan_renderer.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/software_renderer.h" 5 #include "cc/output/software_renderer.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 SkScalarNearlyZero(matrix[SkMatrix::kMPersp2] - 1.0f); 51 SkScalarNearlyZero(matrix[SkMatrix::kMPersp2] - 1.0f);
52 } 52 }
53 53
54 } // anonymous namespace 54 } // anonymous namespace
55 55
56 SoftwareRenderer::SoftwareRenderer(const RendererSettings* settings, 56 SoftwareRenderer::SoftwareRenderer(const RendererSettings* settings,
57 OutputSurface* output_surface, 57 OutputSurface* output_surface,
58 ResourceProvider* resource_provider) 58 ResourceProvider* resource_provider)
59 : DirectRenderer(settings, output_surface, resource_provider), 59 : DirectRenderer(settings, output_surface, resource_provider),
60 output_device_(output_surface->software_device()) { 60 output_device_(output_surface->software_device()) {
61 if (resource_provider_) {
62 capabilities_.max_texture_size = resource_provider_->max_texture_size();
63 capabilities_.best_texture_format =
64 resource_provider_->best_texture_format();
65 }
61 } 66 }
62 67
63 SoftwareRenderer::~SoftwareRenderer() {} 68 SoftwareRenderer::~SoftwareRenderer() {}
64 69
70 const RendererCapabilitiesImpl& SoftwareRenderer::Capabilities() const {
71 return capabilities_;
72 }
73
65 bool SoftwareRenderer::CanPartialSwap() { 74 bool SoftwareRenderer::CanPartialSwap() {
66 return true; 75 return true;
67 } 76 }
68 77
69 void SoftwareRenderer::BeginDrawingFrame(DrawingFrame* frame) { 78 void SoftwareRenderer::BeginDrawingFrame(DrawingFrame* frame) {
70 TRACE_EVENT0("cc", "SoftwareRenderer::BeginDrawingFrame"); 79 TRACE_EVENT0("cc", "SoftwareRenderer::BeginDrawingFrame");
71 root_canvas_ = output_device_->BeginPaint(frame->root_damage_rect); 80 root_canvas_ = output_device_->BeginPaint(frame->root_damage_rect);
72 } 81 }
73 82
74 void SoftwareRenderer::FinishDrawingFrame(DrawingFrame* frame) { 83 void SoftwareRenderer::FinishDrawingFrame(DrawingFrame* frame) {
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); 718 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr);
710 719
711 if (!filter_backdrop_image) 720 if (!filter_backdrop_image)
712 return nullptr; 721 return nullptr;
713 722
714 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, 723 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode,
715 &filter_backdrop_transform); 724 &filter_backdrop_transform);
716 } 725 }
717 726
718 } // namespace cc 727 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer.h ('k') | cc/output/vulkan_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698