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

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

Issue 2674493003: Add compositor support for half-float RGBA buffers and textures (Closed)
Patch Set: Don't enable on non-ES3 yet Created 3 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/software_renderer.h ('k') | cc/raster/gpu_raster_buffer_provider.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/copy_output_request.h" 10 #include "cc/output/copy_output_request.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 : DirectRenderer(settings, output_surface, resource_provider), 58 : DirectRenderer(settings, output_surface, resource_provider),
59 output_device_(output_surface->software_device()) { 59 output_device_(output_surface->software_device()) {
60 } 60 }
61 61
62 SoftwareRenderer::~SoftwareRenderer() {} 62 SoftwareRenderer::~SoftwareRenderer() {}
63 63
64 bool SoftwareRenderer::CanPartialSwap() { 64 bool SoftwareRenderer::CanPartialSwap() {
65 return true; 65 return true;
66 } 66 }
67 67
68 ResourceFormat SoftwareRenderer::BackbufferFormat() const {
69 return resource_provider_->best_texture_format();
70 }
71
68 void SoftwareRenderer::BeginDrawingFrame(DrawingFrame* frame) { 72 void SoftwareRenderer::BeginDrawingFrame(DrawingFrame* frame) {
69 TRACE_EVENT0("cc", "SoftwareRenderer::BeginDrawingFrame"); 73 TRACE_EVENT0("cc", "SoftwareRenderer::BeginDrawingFrame");
70 root_canvas_ = output_device_->BeginPaint(frame->root_damage_rect); 74 root_canvas_ = output_device_->BeginPaint(frame->root_damage_rect);
71 } 75 }
72 76
73 void SoftwareRenderer::FinishDrawingFrame(DrawingFrame* frame) { 77 void SoftwareRenderer::FinishDrawingFrame(DrawingFrame* frame) {
74 TRACE_EVENT0("cc", "SoftwareRenderer::FinishDrawingFrame"); 78 TRACE_EVENT0("cc", "SoftwareRenderer::FinishDrawingFrame");
75 current_framebuffer_lock_ = nullptr; 79 current_framebuffer_lock_ = nullptr;
76 current_framebuffer_canvas_.reset(); 80 current_framebuffer_canvas_.reset();
77 current_canvas_ = nullptr; 81 current_canvas_ = nullptr;
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); 723 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr);
720 724
721 if (!filter_backdrop_image) 725 if (!filter_backdrop_image)
722 return nullptr; 726 return nullptr;
723 727
724 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, 728 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode,
725 &filter_backdrop_transform); 729 &filter_backdrop_transform);
726 } 730 }
727 731
728 } // namespace cc 732 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer.h ('k') | cc/raster/gpu_raster_buffer_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698