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

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

Issue 2267263002: cc: Delete all the RendererCapabilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-prepare-mailbox-param
Patch Set: renderer-caps: rebase 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 }
66 } 61 }
67 62
68 SoftwareRenderer::~SoftwareRenderer() {} 63 SoftwareRenderer::~SoftwareRenderer() {}
69 64
70 const RendererCapabilitiesImpl& SoftwareRenderer::Capabilities() const {
71 return capabilities_;
72 }
73
74 bool SoftwareRenderer::CanPartialSwap() { 65 bool SoftwareRenderer::CanPartialSwap() {
75 return true; 66 return true;
76 } 67 }
77 68
78 void SoftwareRenderer::BeginDrawingFrame(DrawingFrame* frame) { 69 void SoftwareRenderer::BeginDrawingFrame(DrawingFrame* frame) {
79 TRACE_EVENT0("cc", "SoftwareRenderer::BeginDrawingFrame"); 70 TRACE_EVENT0("cc", "SoftwareRenderer::BeginDrawingFrame");
80 root_canvas_ = output_device_->BeginPaint(frame->root_damage_rect); 71 root_canvas_ = output_device_->BeginPaint(frame->root_damage_rect);
81 } 72 }
82 73
83 void SoftwareRenderer::FinishDrawingFrame(DrawingFrame* frame) { 74 void SoftwareRenderer::FinishDrawingFrame(DrawingFrame* frame) {
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); 709 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr);
719 710
720 if (!filter_backdrop_image) 711 if (!filter_backdrop_image)
721 return nullptr; 712 return nullptr;
722 713
723 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, 714 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode,
724 &filter_backdrop_transform); 715 &filter_backdrop_transform);
725 } 716 }
726 717
727 } // namespace cc 718 } // 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