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

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 14417014: cc: Add tile-free software compositing mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to 199251 Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/append_quads_data.h ('k') | cc/layers/picture_layer_impl_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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 void PictureLayerImpl::AppendQuads(QuadSink* quad_sink, 93 void PictureLayerImpl::AppendQuads(QuadSink* quad_sink,
94 AppendQuadsData* append_quads_data) { 94 AppendQuadsData* append_quads_data) {
95 gfx::Rect rect(visible_content_rect()); 95 gfx::Rect rect(visible_content_rect());
96 gfx::Rect content_rect(content_bounds()); 96 gfx::Rect content_rect(content_bounds());
97 97
98 SharedQuadState* shared_quad_state = 98 SharedQuadState* shared_quad_state =
99 quad_sink->UseSharedQuadState(CreateSharedQuadState()); 99 quad_sink->UseSharedQuadState(CreateSharedQuadState());
100 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); 100 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data);
101 101
102 if (!append_quads_data->allow_tile_draw_quads) {
103 gfx::Rect geometry_rect = rect;
104 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect();
105 gfx::Size texture_size = rect.size();
106 gfx::RectF texture_rect = gfx::RectF(texture_size);
107 gfx::Rect quad_content_rect = rect;
108 float contents_scale = contents_scale_x();
109
110 scoped_ptr<PictureDrawQuad> quad = PictureDrawQuad::Create();
111 quad->SetNew(shared_quad_state,
112 geometry_rect,
113 opaque_rect,
114 texture_rect,
115 texture_size,
116 false,
117 quad_content_rect,
118 contents_scale,
119 pile_);
120 if (quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data))
121 append_quads_data->num_missing_tiles++;
122 return;
123 }
124
102 bool clipped = false; 125 bool clipped = false;
103 gfx::QuadF target_quad = MathUtil::MapQuad( 126 gfx::QuadF target_quad = MathUtil::MapQuad(
104 draw_transform(), 127 draw_transform(),
105 gfx::QuadF(rect), 128 gfx::QuadF(rect),
106 &clipped); 129 &clipped);
107 if (ShowDebugBorders()) { 130 if (ShowDebugBorders()) {
108 for (PictureLayerTilingSet::CoverageIterator iter( 131 for (PictureLayerTilingSet::CoverageIterator iter(
109 tilings_.get(), contents_scale_x(), rect, ideal_contents_scale_); 132 tilings_.get(), contents_scale_x(), rect, ideal_contents_scale_);
110 iter; 133 iter;
111 ++iter) { 134 ++iter) {
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 943
921 void PictureLayerImpl::AsValueInto(base::DictionaryValue* state) const { 944 void PictureLayerImpl::AsValueInto(base::DictionaryValue* state) const {
922 LayerImpl::AsValueInto(state); 945 LayerImpl::AsValueInto(state);
923 TracedValue::MakeDictIntoImplicitSnapshot( 946 TracedValue::MakeDictIntoImplicitSnapshot(
924 state, "cc::PictureLayerImpl", this); 947 state, "cc::PictureLayerImpl", this);
925 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); 948 state->SetDouble("ideal_contents_scale", ideal_contents_scale_);
926 state->Set("tilings", tilings_->AsValue().release()); 949 state->Set("tilings", tilings_->AsValue().release());
927 } 950 }
928 951
929 } // namespace cc 952 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/append_quads_data.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698