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

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

Issue 2034583002: Initialize the Display's renderer when the Display is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@displaytest
Patch Set: displayinit: . Created 4 years, 4 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/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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 IsScalarNearlyInteger(matrix[SkMatrix::kMTransY]) && 44 IsScalarNearlyInteger(matrix[SkMatrix::kMTransY]) &&
45 SkScalarNearlyZero(matrix[SkMatrix::kMSkewX]) && 45 SkScalarNearlyZero(matrix[SkMatrix::kMSkewX]) &&
46 SkScalarNearlyZero(matrix[SkMatrix::kMSkewY]) && 46 SkScalarNearlyZero(matrix[SkMatrix::kMSkewY]) &&
47 SkScalarNearlyZero(matrix[SkMatrix::kMPersp0]) && 47 SkScalarNearlyZero(matrix[SkMatrix::kMPersp0]) &&
48 SkScalarNearlyZero(matrix[SkMatrix::kMPersp1]) && 48 SkScalarNearlyZero(matrix[SkMatrix::kMPersp1]) &&
49 SkScalarNearlyZero(matrix[SkMatrix::kMPersp2] - 1.0f); 49 SkScalarNearlyZero(matrix[SkMatrix::kMPersp2] - 1.0f);
50 } 50 }
51 51
52 } // anonymous namespace 52 } // anonymous namespace
53 53
54 std::unique_ptr<SoftwareRenderer> SoftwareRenderer::Create(
55 RendererClient* client,
56 const RendererSettings* settings,
57 OutputSurface* output_surface,
58 ResourceProvider* resource_provider) {
59 return base::WrapUnique(new SoftwareRenderer(client, settings, output_surface,
60 resource_provider));
61 }
62
63 SoftwareRenderer::SoftwareRenderer(RendererClient* client, 54 SoftwareRenderer::SoftwareRenderer(RendererClient* client,
64 const RendererSettings* settings, 55 const RendererSettings* settings,
65 OutputSurface* output_surface, 56 OutputSurface* output_surface,
66 ResourceProvider* resource_provider) 57 ResourceProvider* resource_provider)
67 : DirectRenderer(client, settings, output_surface, resource_provider), 58 : DirectRenderer(client, settings, output_surface, resource_provider),
68 is_scissor_enabled_(false), 59 is_scissor_enabled_(false),
69 is_backbuffer_discarded_(false), 60 is_backbuffer_discarded_(false),
70 output_device_(output_surface->software_device()), 61 output_device_(output_surface->software_device()),
71 current_canvas_(nullptr) { 62 current_canvas_(nullptr) {
72 if (resource_provider_) { 63 if (resource_provider_) {
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); 744 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr);
754 745
755 if (!filter_backdrop_image) 746 if (!filter_backdrop_image)
756 return nullptr; 747 return nullptr;
757 748
758 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, 749 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode,
759 &filter_backdrop_transform); 750 &filter_backdrop_transform);
760 } 751 }
761 752
762 } // namespace cc 753 } // 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