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

Side by Side Diff: cc/gl_renderer.cc

Issue 11360066: cc: Remove WebCore rect use from the compositor, except within Region. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Signs Created 8 years, 1 month 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/cc.gyp ('k') | cc/layer.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/gl_renderer.h" 7 #include "cc/gl_renderer.h"
8 8
9 #include "FloatRect.h"
10 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
11 #include "base/logging.h" 10 #include "base/logging.h"
12 #include "base/string_split.h" 11 #include "base/string_split.h"
13 #include "base/string_util.h" 12 #include "base/string_util.h"
14 #include "cc/damage_tracker.h" 13 #include "cc/damage_tracker.h"
15 #include "cc/geometry_binding.h" 14 #include "cc/geometry_binding.h"
16 #include "cc/layer_quad.h" 15 #include "cc/layer_quad.h"
17 #include "cc/math_util.h" 16 #include "cc/math_util.h"
18 #include "cc/platform_color.h" 17 #include "cc/platform_color.h"
19 #include "cc/priority_calculator.h" 18 #include "cc/priority_calculator.h"
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 copyTextureToFramebuffer(frame, lock.textureId(), quad->quadRect(), quad ->quadTransform()); 544 copyTextureToFramebuffer(frame, lock.textureId(), quad->quadRect(), quad ->quadTransform());
546 } 545 }
547 546
548 bool clipped = false; 547 bool clipped = false;
549 gfx::QuadF deviceQuad = MathUtil::mapQuad(contentsDeviceTransform, sharedGeo metryQuad(), clipped); 548 gfx::QuadF deviceQuad = MathUtil::mapQuad(contentsDeviceTransform, sharedGeo metryQuad(), clipped);
550 DCHECK(!clipped); 549 DCHECK(!clipped);
551 LayerQuad deviceLayerBounds = LayerQuad(gfx::QuadF(deviceQuad.BoundingBox()) ); 550 LayerQuad deviceLayerBounds = LayerQuad(gfx::QuadF(deviceQuad.BoundingBox()) );
552 LayerQuad deviceLayerEdges = LayerQuad(deviceQuad); 551 LayerQuad deviceLayerEdges = LayerQuad(deviceQuad);
553 552
554 // Use anti-aliasing programs only when necessary. 553 // Use anti-aliasing programs only when necessary.
555 bool useAA = (!deviceQuad.IsRectilinear() || !cc::FloatRect(deviceQuad.Bound ingBox()).isExpressibleAsIntRect()); 554 bool useAA = (!deviceQuad.IsRectilinear() || !deviceQuad.BoundingBox().IsExp ressibleAsRect());
556 if (useAA) { 555 if (useAA) {
557 deviceLayerBounds.inflateAntiAliasingDistance(); 556 deviceLayerBounds.inflateAntiAliasingDistance();
558 deviceLayerEdges.inflateAntiAliasingDistance(); 557 deviceLayerEdges.inflateAntiAliasingDistance();
559 } 558 }
560 559
561 scoped_ptr<ResourceProvider::ScopedReadLockGL> maskResourceLock; 560 scoped_ptr<ResourceProvider::ScopedReadLockGL> maskResourceLock;
562 unsigned maskTextureId = 0; 561 unsigned maskTextureId = 0;
563 if (quad->maskResourceId()) { 562 if (quad->maskResourceId()) {
564 maskResourceLock.reset(new ResourceProvider::ScopedReadLockGL(m_resource Provider, quad->maskResourceId())); 563 maskResourceLock.reset(new ResourceProvider::ScopedReadLockGL(m_resource Provider, quad->maskResourceId()));
565 maskTextureId = maskResourceLock->textureId(); 564 maskTextureId = maskResourceLock->textureId();
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 1625
1627 releaseRenderPassTextures(); 1626 releaseRenderPassTextures();
1628 } 1627 }
1629 1628
1630 bool GLRenderer::isContextLost() 1629 bool GLRenderer::isContextLost()
1631 { 1630 {
1632 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR); 1631 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR);
1633 } 1632 }
1634 1633
1635 } // namespace cc 1634 } // namespace cc
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698